首页 > 最新文献

Proceedings of the 18th ACM SIGPLAN international conference on Functional programming最新文献

英文 中文
Correctness of an STM Haskell implementation STM Haskell实现的正确性
M. Schmidt-Schauß, David Sabel
A concurrent implementation of software transactional memory in Concurrent Haskell using a call-by-need functional language with processes and futures is given. The description of the small-step operational semantics is precise and explicit, and employs an early abort of conflicting transactions. A proof of correctness of the implementation is given for a contextual semantics with may- and should-convergence. This implies that our implementation is a correct evaluator for an abstract specification equipped with a big-step semantics.
在concurrent Haskell中,使用一种带进程和未来的按需调用函数语言实现了软件事务内存的并发实现。小步骤操作语义的描述是精确和显式的,并采用了冲突事务的早期中止。对于具有可能和应该收敛性的上下文语义,给出了实现正确性的证明。这意味着我们的实现对于带有大步骤语义的抽象规范来说是一个正确的求值器。
{"title":"Correctness of an STM Haskell implementation","authors":"M. Schmidt-Schauß, David Sabel","doi":"10.1145/2500365.2500585","DOIUrl":"https://doi.org/10.1145/2500365.2500585","url":null,"abstract":"A concurrent implementation of software transactional memory in Concurrent Haskell using a call-by-need functional language with processes and futures is given. The description of the small-step operational semantics is precise and explicit, and employs an early abort of conflicting transactions. A proof of correctness of the implementation is given for a contextual semantics with may- and should-convergence. This implies that our implementation is a correct evaluator for an abstract specification equipped with a big-step semantics.","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"37 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2013-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"75389933","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 7
Type-theory in color 颜色的类型理论
Jean-Philippe Bernardy, Guilhem Moulin
Dependent type-theory aims to become the standard way to formalize mathematics at the same time as displacing traditional platforms for high-assurance programming. However, current implementations of type theory are still lacking, in the sense that some obvious truths require explicit proofs, making type-theory awkward to use for many applications, both in formalization and programming. In particular, notions of erasure are poorly supported. In this paper we propose an extension of type-theory with colored terms, color erasure and interpretation of colored types as predicates. The result is a more powerful type-theory: some definitions and proofs may be omitted as they become trivial, it becomes easier to program with precise types, and some parametricity results can be internalized.
依赖类型论旨在成为形式化数学的标准方法,同时取代传统平台进行高保证编程。然而,类型论的当前实现仍然缺乏,在某种意义上,一些明显的真理需要明确的证明,使得类型论在许多应用程序中难以使用,无论是在形式化还是编程中。特别是,擦除的概念很少得到支持。本文提出了带色项的类型论的扩展、带色擦除和带色类型作为谓词的解释。结果是一个更强大的类型理论:一些定义和证明可以被省略,因为它们变得微不足道,使用精确类型编程变得更容易,并且一些参数性结果可以内化。
{"title":"Type-theory in color","authors":"Jean-Philippe Bernardy, Guilhem Moulin","doi":"10.1145/2500365.2500577","DOIUrl":"https://doi.org/10.1145/2500365.2500577","url":null,"abstract":"Dependent type-theory aims to become the standard way to formalize mathematics at the same time as displacing traditional platforms for high-assurance programming. However, current implementations of type theory are still lacking, in the sense that some obvious truths require explicit proofs, making type-theory awkward to use for many applications, both in formalization and programming. In particular, notions of erasure are poorly supported. In this paper we propose an extension of type-theory with colored terms, color erasure and interpretation of colored types as predicates. The result is a more powerful type-theory: some definitions and proofs may be omitted as they become trivial, it becomes easier to program with precise types, and some parametricity results can be internalized.","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"71 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2013-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"73399165","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 45
Unifying refinement and hoare-style reasoning in a logic for higher-order concurrency 在高阶并发性的逻辑中统一精化和hore -style推理
Aaron Turon, Derek Dreyer, L. Birkedal
Modular programming and modular verification go hand in hand, but most existing logics for concurrency ignore two crucial forms of modularity: *higher-order functions*, which are essential for building reusable components, and *granularity abstraction*, a key technique for hiding the intricacies of fine-grained concurrent data structures from the clients of those data structures. In this paper, we present CaReSL, the first logic to support the use of granularity abstraction for modular verification of higher-order concurrent programs. After motivating the features of CaReSL through a variety of illustrative examples, we demonstrate its effectiveness by using it to tackle a significant case study: the first formal proof of (partial) correctness for Hendler et al.'s "flat combining" algorithm.
模块化编程和模块化验证是齐头并进的,但是大多数现有的并发逻辑都忽略了模块化的两种关键形式:*高阶函数*,这是构建可重用组件所必需的;以及*粒度抽象*,这是向这些数据结构的客户端隐藏细粒度并发数据结构的复杂性的关键技术。在本文中,我们提出了CaReSL,这是第一个支持使用粒度抽象对高阶并发程序进行模块化验证的逻辑。在通过各种说明性示例激发CaReSL的特征之后,我们通过使用它来解决一个重要的案例研究来证明其有效性:Hendler等人的“平面组合”算法的(部分)正确性的第一个正式证明。
{"title":"Unifying refinement and hoare-style reasoning in a logic for higher-order concurrency","authors":"Aaron Turon, Derek Dreyer, L. Birkedal","doi":"10.1145/2500365.2500600","DOIUrl":"https://doi.org/10.1145/2500365.2500600","url":null,"abstract":"Modular programming and modular verification go hand in hand, but most existing logics for concurrency ignore two crucial forms of modularity: *higher-order functions*, which are essential for building reusable components, and *granularity abstraction*, a key technique for hiding the intricacies of fine-grained concurrent data structures from the clients of those data structures. In this paper, we present CaReSL, the first logic to support the use of granularity abstraction for modular verification of higher-order concurrent programs. After motivating the features of CaReSL through a variety of illustrative examples, we demonstrate its effectiveness by using it to tackle a significant case study: the first formal proof of (partial) correctness for Hendler et al.'s \"flat combining\" algorithm.","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"63 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2013-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"73303062","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 144
Programming and reasoning with algebraic effects and dependent types 具有代数效应和相关类型的编程和推理
Edwin C. Brady
One often cited benefit of pure functional programming is that pure code is easier to test and reason about, both formally and informally. However, real programs have side-effects including state management, exceptions and interactions with the outside world. Haskell solves this problem using monads to capture details of possibly side-effecting computations --- it provides monads for capturing state, I/O, exceptions, non-determinism, libraries for practical purposes such as CGI and parsing, and many others, as well as monad transformers for combining multiple effects. Unfortunately, useful as monads are, they do not compose very well. Monad transformers can quickly become unwieldy when there are lots of effects to manage, leading to a temptation in larger programs to combine everything into one coarse-grained state and exception monad. In this paper I describe an alternative approach based on handling algebraic effects, implemented in the IDRIS programming language. I show how to describe side effecting computations, how to write programs which compose multiple fine-grained effects, and how, using dependent types, we can use this approach to reason about states in effectful programs.
纯函数式编程的一个经常被提到的好处是,纯代码更容易测试和推理,无论是正式的还是非正式的。然而,真正的程序有副作用,包括状态管理、异常和与外部世界的交互。Haskell使用单子来捕获可能产生副作用的计算的细节来解决这个问题——它提供了单子来捕获状态、I/O、异常、非确定性、用于实际目的的库(如CGI和解析)以及许多其他用途,以及用于组合多种效果的单子转换器。不幸的是,虽然单子很有用,但它们的组合并不好。当有很多效果需要管理时,Monad转换器很快就会变得笨拙,导致在较大的程序中倾向于将所有东西组合成一个粗粒度的状态和异常Monad。在本文中,我描述了一种基于处理代数效果的替代方法,该方法用IDRIS编程语言实现。我将展示如何描述副作用计算,如何编写包含多个细粒度效果的程序,以及如何使用依赖类型使用这种方法来推断有效程序中的状态。
{"title":"Programming and reasoning with algebraic effects and dependent types","authors":"Edwin C. Brady","doi":"10.1145/2500365.2500581","DOIUrl":"https://doi.org/10.1145/2500365.2500581","url":null,"abstract":"One often cited benefit of pure functional programming is that pure code is easier to test and reason about, both formally and informally. However, real programs have side-effects including state management, exceptions and interactions with the outside world. Haskell solves this problem using monads to capture details of possibly side-effecting computations --- it provides monads for capturing state, I/O, exceptions, non-determinism, libraries for practical purposes such as CGI and parsing, and many others, as well as monad transformers for combining multiple effects. Unfortunately, useful as monads are, they do not compose very well. Monad transformers can quickly become unwieldy when there are lots of effects to manage, leading to a temptation in larger programs to combine everything into one coarse-grained state and exception monad. In this paper I describe an alternative approach based on handling algebraic effects, implemented in the IDRIS programming language. I show how to describe side effecting computations, how to write programs which compose multiple fine-grained effects, and how, using dependent types, we can use this approach to reason about states in effectful programs.","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"14 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2013-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"80282644","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 109
Mtac: a monad for typed tactic programming in Coq Coq中用于类型化策略编程的单子
Beta Ziliani, Derek Dreyer, N. Krishnaswami, Aleksandar Nanevski, Viktor Vafeiadis
Effective support for custom proof automation is essential for large scale interactive proof development. However, existing languages for automation via *tactics* either (a) provide no way to specify the behavior of tactics within the base logic of the accompanying theorem prover, or (b) rely on advanced type-theoretic machinery that is not easily integrated into established theorem provers. We present Mtac, a lightweight but powerful extension to Coq that supports dependently-typed tactic programming. Mtac tactics have access to all the features of ordinary Coq programming, as well as a new set of typed tactical primitives. We avoid the need to touch the trusted kernel typechecker of Coq by encapsulating uses of these new tactical primitives in a *monad*, and instrumenting Coq so that it executes monadic tactics during type inference.
对自定义证明自动化的有效支持对于大规模交互式证明开发至关重要。然而,现有的通过*策略*实现自动化的语言要么(a)没有提供在伴随的定理证明者的基本逻辑中指定策略行为的方法,要么(b)依赖于不容易集成到已建立的定理证明者中的高级类型论机制。我们介绍了Mtac,它是Coq的一个轻量级但功能强大的扩展,支持依赖类型的策略编程。Mtac策略可以访问普通Coq编程的所有功能,以及一组新的类型战术原语。我们通过将这些新的策略原语封装在*monad*中,并对Coq进行插装,以便在类型推断期间执行monadic策略,从而避免了触及Coq的可信内核类型检查器的需要。
{"title":"Mtac: a monad for typed tactic programming in Coq","authors":"Beta Ziliani, Derek Dreyer, N. Krishnaswami, Aleksandar Nanevski, Viktor Vafeiadis","doi":"10.1145/2500365.2500579","DOIUrl":"https://doi.org/10.1145/2500365.2500579","url":null,"abstract":"Effective support for custom proof automation is essential for large scale interactive proof development. However, existing languages for automation via *tactics* either (a) provide no way to specify the behavior of tactics within the base logic of the accompanying theorem prover, or (b) rely on advanced type-theoretic machinery that is not easily integrated into established theorem provers. We present Mtac, a lightweight but powerful extension to Coq that supports dependently-typed tactic programming. Mtac tactics have access to all the features of ordinary Coq programming, as well as a new set of typed tactical primitives. We avoid the need to touch the trusted kernel typechecker of Coq by encapsulating uses of these new tactical primitives in a *monad*, and instrumenting Coq so that it executes monadic tactics during type inference.","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"1 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2013-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"73128362","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 83
Higher-order functional reactive programming without spacetime leaks 没有时空泄漏的高阶函数式响应式编程
N. Krishnaswami
Functional reactive programming (FRP) is an elegant approach to declaratively specify reactive systems. However, the powerful abstractions of FRP have historically made it difficult to predict and control the resource usage of programs written in this style. In this paper, we give a new language for higher-order reactive programming. Our language generalizes and simplifies prior type systems for reactive programming, by supporting the use of streams of streams, first-class functions, and higher-order operations. We also support many temporal operations beyond streams, such as terminatable streams, events, and even resumptions with first-class schedulers. Furthermore, our language supports an efficient implementation strategy permitting us to eagerly deallocate old values and statically rule out spacetime leaks, a notorious source of inefficiency in reactive programs. Furthermore, these memory guarantees are achieved without the use of a complex substructural type discipline. We also show that our implementation strategy of eager deallocation is safe, by showing the soundness of our type system with a novel step-indexed Kripke logical relation.
函数式响应式编程(FRP)是一种以声明方式指定响应式系统的优雅方法。然而,强大的抽象玻璃钢曾经是难以预测和控制的资源使用情况编写的程序在这个风格。在本文中,我们给出一个新的高阶反应性编程语言。通过支持流的流、一等函数和高阶操作,我们的语言对响应式编程的先前类型系统进行了一般化和简化。我们还支持流之外的许多临时操作,例如可终止流、事件,甚至是使用一级调度器的恢复。此外,我们的语言支持一种有效的实现策略,允许我们急切地释放旧值,并静态地排除时空泄漏,这是响应性程序中效率低下的一个臭名昭著的来源。此外,这些内存保证实现不使用复杂的工程类型的纪律。我们还通过使用一种新的阶跃索引Kripke逻辑关系来展示我们的类型系统的健全性,从而证明了我们的急于释放实现策略是安全的。
{"title":"Higher-order functional reactive programming without spacetime leaks","authors":"N. Krishnaswami","doi":"10.1145/2500365.2500588","DOIUrl":"https://doi.org/10.1145/2500365.2500588","url":null,"abstract":"Functional reactive programming (FRP) is an elegant approach to declaratively specify reactive systems. However, the powerful abstractions of FRP have historically made it difficult to predict and control the resource usage of programs written in this style. In this paper, we give a new language for higher-order reactive programming. Our language generalizes and simplifies prior type systems for reactive programming, by supporting the use of streams of streams, first-class functions, and higher-order operations. We also support many temporal operations beyond streams, such as terminatable streams, events, and even resumptions with first-class schedulers. Furthermore, our language supports an efficient implementation strategy permitting us to eagerly deallocate old values and statically rule out spacetime leaks, a notorious source of inefficiency in reactive programs. Furthermore, these memory guarantees are achieved without the use of a complex substructural type discipline. We also show that our implementation strategy of eager deallocation is safe, by showing the soundness of our type system with a novel step-indexed Kripke logical relation.","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"586 2 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2013-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"76325944","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 70
Programming with permissions in Mezzo 在Mezzo中使用权限进行编程
Jonathan Protzenko, F. Pottier
We present Mezzo, a typed programming language of ML lineage. Mezzo is equipped with a novel static discipline of duplicable and affine permissions, which controls aliasing and ownership. This rules out certain mistakes, including representation exposure and data races, and enables new idioms, such as gradual initialization, memory re-use, and (type)state changes. Although the core static discipline disallows sharing a mutable data structure, Mezzo offers several ways of working around this restriction, including a novel dynamic ownership control mechanism which we dub "adoption and abandon".
我们提出了一种ML血统的类型化编程语言Mezzo。Mezzo配备了可复制和仿射权限的新颖静态规则,可以控制别名和所有权。这排除了某些错误,包括表示暴露和数据竞争,并支持新的习惯用法,例如渐进初始化、内存重用和(类型)状态更改。虽然核心静态规范不允许共享可变数据结构,但Mezzo提供了几种解决这一限制的方法,包括一种新的动态所有权控制机制,我们称之为“采用和放弃”。
{"title":"Programming with permissions in Mezzo","authors":"Jonathan Protzenko, F. Pottier","doi":"10.1145/2500365.2500598","DOIUrl":"https://doi.org/10.1145/2500365.2500598","url":null,"abstract":"We present Mezzo, a typed programming language of ML lineage. Mezzo is equipped with a novel static discipline of duplicable and affine permissions, which controls aliasing and ownership. This rules out certain mistakes, including representation exposure and data races, and enables new idioms, such as gradual initialization, memory re-use, and (type)state changes. Although the core static discipline disallows sharing a mutable data structure, Mezzo offers several ways of working around this restriction, including a novel dynamic ownership control mechanism which we dub \"adoption and abandon\".","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"32 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2013-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"76462731","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 38
Handlers in action 运行中的处理程序
Ohad Kammar, S. Lindley, N. Oury
Plotkin and Pretnar's handlers for algebraic effects occupy a sweet spot in the design space of abstractions for effectful computation. By separating effect signatures from their implementation, algebraic effects provide a high degree of modularity, allowing programmers to express effectful programs independently of the concrete interpretation of their effects. A handler is an interpretation of the effects of an algebraic computation. The handler abstraction adapts well to multiple settings: pure or impure, strict or lazy, static types or dynamic types. This is a position paper whose main aim is to popularise the handler abstraction. We give a gentle introduction to its use, a collection of illustrative examples, and a straightforward operational semantics. We describe our Haskell implementation of handlers in detail, outline the ideas behind our OCaml, SML, and Racket implementations, and present experimental results comparing handlers with existing code.
Plotkin和Pretnar的代数效果处理程序在有效计算的抽象设计空间中占据了一个甜蜜的位置。通过将效果签名与其实现分离,代数效果提供了高度的模块化,允许程序员独立于对其效果的具体解释来表达有效的程序。处理程序是对代数计算结果的解释。处理程序抽象可以很好地适应多种设置:纯类型或非纯类型、严格类型或惰性类型、静态类型或动态类型。这是一份立场文件,其主要目的是普及处理程序抽象。我们对它的用法作了一个温和的介绍,收集了一些说明性的例子,并给出了一个简单的操作语义。我们详细描述了处理程序的Haskell实现,概述了OCaml、SML和Racket实现背后的思想,并给出了将处理程序与现有代码进行比较的实验结果。
{"title":"Handlers in action","authors":"Ohad Kammar, S. Lindley, N. Oury","doi":"10.1145/2500365.2500590","DOIUrl":"https://doi.org/10.1145/2500365.2500590","url":null,"abstract":"Plotkin and Pretnar's handlers for algebraic effects occupy a sweet spot in the design space of abstractions for effectful computation. By separating effect signatures from their implementation, algebraic effects provide a high degree of modularity, allowing programmers to express effectful programs independently of the concrete interpretation of their effects. A handler is an interpretation of the effects of an algebraic computation. The handler abstraction adapts well to multiple settings: pure or impure, strict or lazy, static types or dynamic types. This is a position paper whose main aim is to popularise the handler abstraction. We give a gentle introduction to its use, a collection of illustrative examples, and a straightforward operational semantics. We describe our Haskell implementation of handlers in detail, outline the ideas behind our OCaml, SML, and Racket implementations, and present experimental results comparing handlers with existing code.","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"10 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2013-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"87811324","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 147
Experience report: applying random testing to a base type environment 经验报告:将随机测试应用于基本类型环境
Vincent St-Amour, N. Toronto
As programmers, programming in typed languages increases our confidence in the correctness of our programs. As type system designers, soundness proofs increase our confidence in the correctness of our type systems. There is more to typed languages than their typing rules, however. To be usable, a typed language needs to provide a well-furnished standard library and to specify types for its exports. As software artifacts, these base type environments can rival typecheckers in complexity. Our experience with the Typed Racket base environment---which accounts for 31% of the code in the Typed Racket implementation---teaches us that writing type environments can be just as error-prone as writing typecheckers. We report on our experience over the past two years of using random testing to increase our confidence in the correctness of the Typed Racket base environment.
作为程序员,使用类型语言编程可以增加我们对程序正确性的信心。作为类型系统设计者,可靠性证明增加了我们对类型系统正确性的信心。然而,类型语言不仅仅是它们的类型规则。为了可用,类型化语言需要提供完善的标准库,并为其导出指定类型。作为软件工件,这些基本类型环境在复杂性上可以与类型检查器相媲美。我们使用类型化球拍基础环境的经验——占类型化球拍实现中31%的代码——告诉我们,编写类型环境可能和编写类型检查器一样容易出错。我们报告我们在过去两年中使用随机测试的经验,以增加我们对Typed Racket基础环境正确性的信心。
{"title":"Experience report: applying random testing to a base type environment","authors":"Vincent St-Amour, N. Toronto","doi":"10.1145/2500365.2500616","DOIUrl":"https://doi.org/10.1145/2500365.2500616","url":null,"abstract":"As programmers, programming in typed languages increases our confidence in the correctness of our programs. As type system designers, soundness proofs increase our confidence in the correctness of our type systems. There is more to typed languages than their typing rules, however. To be usable, a typed language needs to provide a well-furnished standard library and to specify types for its exports. As software artifacts, these base type environments can rival typecheckers in complexity. Our experience with the Typed Racket base environment---which accounts for 31% of the code in the Typed Racket implementation---teaches us that writing type environments can be just as error-prone as writing typecheckers. We report on our experience over the past two years of using random testing to increase our confidence in the correctness of the Typed Racket base environment.","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"26 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2013-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"87053020","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 13
Structural recursion for querying ordered graphs 查询有序图的结构递归
S. Hidaka, Kazuyuki Asada, Zhenjiang Hu, H. Kato, Keisuke Nakano
Structural recursion, in the form of, for example, folds on lists and catamorphisms on algebraic data structures including trees, plays an important role in functional programming, by providing a systematic way for constructing and manipulating functional programs. It is, however, a challenge to define structural recursions for graph data structures, the most ubiquitous sort of data in computing. This is because unlike lists and trees, graphs are essentially not inductive and cannot be formalized as an initial algebra in general. In this paper, we borrow from the database community the idea of structural recursion on how to restrict recursions on infinite unordered regular trees so that they preserve the finiteness property and become terminating, which are desirable properties for query languages. We propose a new graph transformation language called lambdaFG for transforming and querying ordered graphs, based on the well-defined bisimulation relation on ordered graphs with special epsilon-edges. The language lambdaFG is a higher order graph transformation language that extends the simply typed lambda calculus with graph constructors and more powerful structural recursions, which is extended for transformations on the sibling dimension. It not only gives a general framework for manipulating graphs and reasoning about them, but also provides a solution to the open problem of how to define a structural recursion on ordered graphs, with the help of the bisimilarity for ordered graphs with epsilon-edges.
结构递归,例如表上的折叠和代数数据结构(包括树)上的变形,在函数式编程中起着重要的作用,它为构造和操作函数式程序提供了一种系统的方法。然而,为图数据结构定义结构递归是一个挑战,图数据结构是计算中最普遍的数据类型。这是因为与列表和树不同,图本质上不是归纳的,一般不能形式化为初始代数。本文借鉴数据库界的结构递归思想,研究了如何在无限无序正则树上限制递归,使其保持有限性和终止性,这是查询语言所需要的特性。基于具有特殊ε边的有序图上定义好的双模拟关系,提出了一种新的图变换语言lambdaFG,用于有序图的变换和查询。lambdaFG语言是一种高阶图转换语言,它使用图构造函数和更强大的结构递归扩展了简单类型的lambda演算,并扩展为兄弟维度上的转换。它不仅给出了一个操作图和推理图的一般框架,而且还提供了一个解决如何在有序图上定义结构递归的开放问题的方法,该方法利用了带ε边的有序图的双相似度。
{"title":"Structural recursion for querying ordered graphs","authors":"S. Hidaka, Kazuyuki Asada, Zhenjiang Hu, H. Kato, Keisuke Nakano","doi":"10.1145/2500365.2500608","DOIUrl":"https://doi.org/10.1145/2500365.2500608","url":null,"abstract":"Structural recursion, in the form of, for example, folds on lists and catamorphisms on algebraic data structures including trees, plays an important role in functional programming, by providing a systematic way for constructing and manipulating functional programs. It is, however, a challenge to define structural recursions for graph data structures, the most ubiquitous sort of data in computing. This is because unlike lists and trees, graphs are essentially not inductive and cannot be formalized as an initial algebra in general. In this paper, we borrow from the database community the idea of structural recursion on how to restrict recursions on infinite unordered regular trees so that they preserve the finiteness property and become terminating, which are desirable properties for query languages. We propose a new graph transformation language called lambdaFG for transforming and querying ordered graphs, based on the well-defined bisimulation relation on ordered graphs with special epsilon-edges. The language lambdaFG is a higher order graph transformation language that extends the simply typed lambda calculus with graph constructors and more powerful structural recursions, which is extended for transformations on the sibling dimension. It not only gives a general framework for manipulating graphs and reasoning about them, but also provides a solution to the open problem of how to define a structural recursion on ordered graphs, with the help of the bisimilarity for ordered graphs with epsilon-edges.","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"967 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2013-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"85646594","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 13
期刊
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
全部 Acc. Chem. Res. ACS Applied Bio Materials ACS Appl. Electron. Mater. ACS Appl. Energy Mater. ACS Appl. Mater. Interfaces ACS Appl. Nano Mater. ACS Appl. Polym. Mater. ACS BIOMATER-SCI ENG ACS Catal. ACS Cent. Sci. ACS Chem. Biol. ACS Chemical Health & Safety ACS Chem. Neurosci. ACS Comb. Sci. ACS Earth Space Chem. ACS Energy Lett. ACS Infect. Dis. ACS Macro Lett. ACS Mater. Lett. ACS Med. Chem. Lett. ACS Nano ACS Omega ACS Photonics ACS Sens. ACS Sustainable Chem. Eng. ACS Synth. Biol. Anal. Chem. BIOCHEMISTRY-US Bioconjugate Chem. BIOMACROMOLECULES Chem. Res. Toxicol. Chem. Rev. Chem. Mater. CRYST GROWTH DES ENERG FUEL Environ. Sci. Technol. Environ. Sci. Technol. Lett. Eur. J. Inorg. Chem. IND ENG CHEM RES Inorg. Chem. J. Agric. Food. Chem. J. Chem. Eng. Data J. Chem. Educ. J. Chem. Inf. Model. J. Chem. Theory Comput. J. Med. Chem. J. Nat. Prod. J PROTEOME RES J. Am. Chem. Soc. LANGMUIR MACROMOLECULES Mol. Pharmaceutics Nano Lett. Org. Lett. ORG PROCESS RES DEV ORGANOMETALLICS J. Org. Chem. J. Phys. Chem. J. Phys. Chem. A J. Phys. Chem. B J. Phys. Chem. C J. Phys. Chem. Lett. Analyst Anal. Methods Biomater. Sci. Catal. Sci. Technol. Chem. Commun. Chem. Soc. Rev. CHEM EDUC RES PRACT CRYSTENGCOMM Dalton Trans. Energy Environ. Sci. ENVIRON SCI-NANO ENVIRON SCI-PROC IMP ENVIRON SCI-WAT RES Faraday Discuss. Food Funct. Green Chem. Inorg. Chem. Front. Integr. Biol. J. Anal. At. Spectrom. J. Mater. Chem. A J. Mater. Chem. B J. Mater. Chem. C Lab Chip Mater. Chem. Front. Mater. Horiz. MEDCHEMCOMM Metallomics Mol. Biosyst. Mol. Syst. Des. Eng. Nanoscale Nanoscale Horiz. Nat. Prod. Rep. New J. Chem. Org. Biomol. Chem. Org. Chem. Front. PHOTOCH PHOTOBIO SCI PCCP Polym. Chem.
×
引用
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