首页 > 最新文献

ACM SIGPLAN Symposium/Workshop on Haskell最新文献

英文 中文
Unembedding domain-specific languages 取消嵌入特定于领域的语言
Pub Date : 2009-09-03 DOI: 10.1145/1596638.1596644
R. Atkey, S. Lindley, J. Yallop
Higher-order abstract syntax provides a convenient way of embedding domain-specific languages, but is awkward to analyse and manipulate directly. We explore the boundaries of higher-order abstract syntax. Our key tool is the unembedding of embedded terms as de Bruijn terms, enabling intensional analysis. As part of our solution we present techniques for separating the definition of an embedded program from its interpretation, giving modular extensions of the embedded language, and different ways to encode the types of the embedded language.
高阶抽象语法为嵌入特定于领域的语言提供了一种方便的方法,但难以直接进行分析和操作。我们探索高阶抽象语法的边界。我们的关键工具是将嵌入的术语作为德布鲁因术语进行解嵌入,从而实现深入分析。作为我们解决方案的一部分,我们提出了将嵌入式程序的定义与其解释分离的技术,给出了嵌入式语言的模块化扩展,以及对嵌入式语言类型进行编码的不同方法。
{"title":"Unembedding domain-specific languages","authors":"R. Atkey, S. Lindley, J. Yallop","doi":"10.1145/1596638.1596644","DOIUrl":"https://doi.org/10.1145/1596638.1596644","url":null,"abstract":"Higher-order abstract syntax provides a convenient way of embedding domain-specific languages, but is awkward to analyse and manipulate directly. We explore the boundaries of higher-order abstract syntax. Our key tool is the unembedding of embedded terms as de Bruijn terms, enabling intensional analysis. As part of our solution we present techniques for separating the definition of an embedded program from its interpretation, giving modular extensions of the embedded language, and different ways to encode the types of the embedded language.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"24 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123530064","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}
引用次数: 42
Lazy functional incremental parsing 惰性函数增量解析
Pub Date : 2009-09-03 DOI: 10.1145/1596638.1596645
Jean-Philippe Bernardy
Structured documents are commonly edited using a free-form editor. Even though every string is an acceptable input, it makes sense to maintain a structured representation of the edited document. The structured representation has a number of uses: structural navigation (and optional structural editing), structure highlighting, etc. The construction of the structure must be done incrementally to be efficient: the time to process an edit operation should be proportional to the size of the change, and (ideally) independent of the total size of the document. We show that combining lazy evaluation and caching of intermediate (partial) results enables incremental parsing. We build a complete incremental parsing library for interactive systems with support for error-correction.
结构化文档通常使用自由格式编辑器进行编辑。即使每个字符串都是可接受的输入,维护已编辑文档的结构化表示也是有意义的。结构化表示有很多用途:结构化导航(和可选的结构化编辑)、结构高亮等。结构的构造必须以增量方式完成,以提高效率:处理编辑操作的时间应该与更改的大小成正比,并且(理想情况下)与文档的总大小无关。我们展示了将惰性求值和中间(部分)结果的缓存结合起来可以实现增量解析。我们为支持纠错的交互式系统构建了一个完整的增量解析库。
{"title":"Lazy functional incremental parsing","authors":"Jean-Philippe Bernardy","doi":"10.1145/1596638.1596645","DOIUrl":"https://doi.org/10.1145/1596638.1596645","url":null,"abstract":"Structured documents are commonly edited using a free-form editor. Even though every string is an acceptable input, it makes sense to maintain a structured representation of the edited document. The structured representation has a number of uses: structural navigation (and optional structural editing), structure highlighting, etc. The construction of the structure must be done incrementally to be efficient: the time to process an edit operation should be proportional to the size of the change, and (ideally) independent of the total size of the document. We show that combining lazy evaluation and caching of intermediate (partial) results enables incremental parsing. We build a complete incremental parsing library for interactive systems with support for error-correction.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"35 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133535824","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}
引用次数: 14
Types are calling conventions 类型调用约定
Pub Date : 2009-09-03 DOI: 10.1145/1596638.1596640
Maximilian Bolingbroke, S. Jones
It is common for compilers to derive the calling convention of a function from its type. Doing so is simple and modular but misses many optimisation opportunities, particularly in lazy, higher-order functional languages with extensive use of currying. We restore the lost opportunities by defining Strict Core, a new intermediate language whose type system makes the missing distinctions: laziness is explicit, and functions take multiple arguments and return multiple results.
编译器通常从函数的类型派生函数的调用约定。这样做是简单和模块化的,但会错过许多优化机会,特别是在大量使用curry的惰性高阶函数式语言中。我们通过定义严格核心(Strict Core)来恢复失去的机会,这是一种新的中间语言,它的类型系统弥补了缺失的区别:惰性是显式的,函数接受多个参数并返回多个结果。
{"title":"Types are calling conventions","authors":"Maximilian Bolingbroke, S. Jones","doi":"10.1145/1596638.1596640","DOIUrl":"https://doi.org/10.1145/1596638.1596640","url":null,"abstract":"It is common for compilers to derive the calling convention of a function from its type. Doing so is simple and modular but misses many optimisation opportunities, particularly in lazy, higher-order functional languages with extensive use of currying. We restore the lost opportunities by defining Strict Core, a new intermediate language whose type system makes the missing distinctions: laziness is explicit, and functions take multiple arguments and return multiple results.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"40 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116827204","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}
引用次数: 10
Type-safe observable sharing in Haskell Haskell中类型安全的可观察对象共享
Pub Date : 2009-09-03 DOI: 10.1145/1596638.1596653
Andy Gill
Haskell is a great language for writing and supporting embedded Domain Specific Languages (DSLs). Some form of observable sharing is often a critical capability for allowing so-called deep DSLs to be compiled and processed. In this paper, we describe and explore uses of an IO function for reification which allows direct observation of sharing.
Haskell是编写和支持嵌入式领域特定语言(dsl)的优秀语言。某种形式的可观察共享通常是允许编译和处理所谓的深度dsl的关键功能。在本文中,我们描述并探索了用于具体化的IO函数的使用,该函数允许直接观察共享。
{"title":"Type-safe observable sharing in Haskell","authors":"Andy Gill","doi":"10.1145/1596638.1596653","DOIUrl":"https://doi.org/10.1145/1596638.1596653","url":null,"abstract":"Haskell is a great language for writing and supporting embedded Domain Specific Languages (DSLs). Some form of observable sharing is often a critical capability for allowing so-called deep DSLs to be compiled and processed. In this paper, we describe and explore uses of an IO function for reification which allows direct observation of sharing.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"41 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125508099","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}
引用次数: 89
Push-pull functional reactive programming 推拉式函数式响应式编程
Pub Date : 2009-09-03 DOI: 10.1145/1596638.1596643
Conal Elliott
Functional reactive programming (FRP) has simple and powerful semantics, but has resisted efficient implementation. In particular, most past implementations have used demand-driven sampling, which accommodates FRP's continuous time semantics and fits well with the nature of functional programming. Consequently, values are wastefully recomputed even when inputs don't change, and reaction latency can be as high as the sampling period. This paper presents a way to implement FRP that combines data- and demand-driven evaluation, in which values are recomputed only when necessary, and reactions are nearly instantaneous. The implementation is rooted in a new simple formulation of FRP and its semantics and so is easy to understand and reason about. On the road to a new implementation, we'll meet some old friends (monoids, functors, applicative functors, monads, morphisms, and improving values) and make some new friends (functional future values, reactive normal form, and concurrent "unambiguous choice").
函数式响应式编程(FRP)具有简单而强大的语义,但难以有效实现。特别是,大多数过去的实现都使用了需求驱动的采样,它适应FRP的连续时间语义,并且很好地符合函数式编程的性质。因此,即使输入没有改变,重新计算值也是浪费的,而且反应延迟可能与采样周期一样高。本文提出了一种实施FRP的方法,该方法结合了数据和需求驱动的评估,其中仅在必要时重新计算值,并且反应几乎是即时的。该实现植根于FRP及其语义的一个新的简单公式,因此易于理解和推理。在通往新实现的道路上,我们会遇到一些老朋友(monoids、函子、应用函子、单子、态态和改进值),并结交一些新朋友(函数未来值、反应范式和并发的“明确选择”)。
{"title":"Push-pull functional reactive programming","authors":"Conal Elliott","doi":"10.1145/1596638.1596643","DOIUrl":"https://doi.org/10.1145/1596638.1596643","url":null,"abstract":"Functional reactive programming (FRP) has simple and powerful semantics, but has resisted efficient implementation. In particular, most past implementations have used demand-driven sampling, which accommodates FRP's continuous time semantics and fits well with the nature of functional programming. Consequently, values are wastefully recomputed even when inputs don't change, and reaction latency can be as high as the sampling period. This paper presents a way to implement FRP that combines data- and demand-driven evaluation, in which values are recomputed only when necessary, and reactions are nearly instantaneous. The implementation is rooted in a new simple formulation of FRP and its semantics and so is easy to understand and reason about. On the road to a new implementation, we'll meet some old friends (monoids, functors, applicative functors, monads, morphisms, and improving values) and make some new friends (functional future values, reactive normal form, and concurrent \"unambiguous choice\").","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"53 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127842611","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}
引用次数: 138
Parallel performance tuning for Haskell Haskell的并行性能调优
Pub Date : 2009-09-03 DOI: 10.1145/1596638.1596649
Don Jones, S. Marlow, Satnam Singh
Parallel Haskell programming has entered the mainstream with support now included in GHC for multiple parallel programming models, along with multicore execution support in the runtime. However, tuning programs for parallelism is still something of a black art. Without much in the way of feedback provided by the runtime system, it is a matter of trial and error combined with experience to achieve good parallel speedups. This paper describes an early prototype of a parallel profiling system for multicore programming with GHC. The system comprises three parts: fast event tracing in the runtime, a Haskell library for reading the resulting trace files, and a number of tools built on this library for presenting the information to the programmer. We focus on one tool in particular, a graphical timeline browser called ThreadScope. The paper illustrates the use of ThreadScope through a number of case studies, and describes some useful methodologies for parallelizing Haskell programs.
随着GHC对多个并行编程模型的支持,以及运行时对多核执行的支持,并行Haskell编程已经进入主流。然而,为并行性调整程序仍然是一种黑色艺术。在没有运行时系统提供的反馈的情况下,要实现良好的并行加速,这是一个与经验相结合的试错问题。本文描述了一个用GHC进行多核编程的并行分析系统的早期原型。该系统由三部分组成:运行时的快速事件跟踪,用于读取结果跟踪文件的Haskell库,以及构建在该库上的用于向程序员显示信息的许多工具。我们特别关注一个工具,一个名为ThreadScope的图形时间线浏览器。本文通过一些案例研究说明了ThreadScope的使用,并描述了一些并行化Haskell程序的有用方法。
{"title":"Parallel performance tuning for Haskell","authors":"Don Jones, S. Marlow, Satnam Singh","doi":"10.1145/1596638.1596649","DOIUrl":"https://doi.org/10.1145/1596638.1596649","url":null,"abstract":"Parallel Haskell programming has entered the mainstream with support now included in GHC for multiple parallel programming models, along with multicore execution support in the runtime. However, tuning programs for parallelism is still something of a black art. Without much in the way of feedback provided by the runtime system, it is a matter of trial and error combined with experience to achieve good parallel speedups.\u0000 This paper describes an early prototype of a parallel profiling system for multicore programming with GHC. The system comprises three parts: fast event tracing in the runtime, a Haskell library for reading the resulting trace files, and a number of tools built on this library for presenting the information to the programmer. We focus on one tool in particular, a graphical timeline browser called ThreadScope.\u0000 The paper illustrates the use of ThreadScope through a number of case studies, and describes some useful methodologies for parallelizing Haskell programs.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"11 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131992270","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}
引用次数: 46
Roll your own test bed for embedded real-time protocols: a haskell experience 推出您自己的嵌入式实时协议测试平台:一种haskell体验
Pub Date : 2009-09-03 DOI: 10.1145/1596638.1596646
Lee Pike, Geoffrey M. Brown, Alwyn E. Goodloe
We present by example a new application domain for functional languages: emulators for embedded real-time protocols. As a case-study, we implement a simple emulator for the Biphase Mark Protocol, a physical-layer network protocol in Haskell. The surprising result is that a pure functional language with no built-in notion of time is extremely well-suited for constructing such emulators. Furthermore, we use Haskell's property-checker QuickCheck to automatically generate real-time parameters for simulation. We also describe a novel use of QuickCheck as a "probability calculator" for reliability analysis.
通过实例介绍了函数式语言的一个新的应用领域:嵌入式实时协议仿真器。作为一个案例研究,我们在Haskell中实现了一个简单的双相标记协议模拟器,这是一个物理层网络协议。令人惊讶的结果是,没有内置时间概念的纯函数式语言非常适合构造这样的模拟器。此外,我们使用Haskell的属性检查器QuickCheck来自动生成仿真的实时参数。我们还描述了QuickCheck作为可靠性分析的“概率计算器”的一种新用法。
{"title":"Roll your own test bed for embedded real-time protocols: a haskell experience","authors":"Lee Pike, Geoffrey M. Brown, Alwyn E. Goodloe","doi":"10.1145/1596638.1596646","DOIUrl":"https://doi.org/10.1145/1596638.1596646","url":null,"abstract":"We present by example a new application domain for functional languages: emulators for embedded real-time protocols. As a case-study, we implement a simple emulator for the Biphase Mark Protocol, a physical-layer network protocol in Haskell. The surprising result is that a pure functional language with no built-in notion of time is extremely well-suited for constructing such emulators. Furthermore, we use Haskell's property-checker QuickCheck to automatically generate real-time parameters for simulation. We also describe a novel use of QuickCheck as a \"probability calculator\" for reliability analysis.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"08 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127218156","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}
引用次数: 1
Finding the needle: stack traces for GHC 寻找针头:GHC的堆叠痕迹
Pub Date : 2009-09-03 DOI: 10.1145/1596638.1596654
T. O. R. Allwood, S. Jones, S. Eisenbach
Even Haskell programs can occasionally go wrong. Programs calling head on an empty list, and incomplete patterns in function definitions can cause program crashes, reporting little more than the precise location where error was ultimately called. Being told that one application of the head function in your program went wrong, without knowing which use of head went wrong can be infuriating. We present our work on adding the ability to get stack traces out of GHC, for example that our crashing head was used during the evaluation of foo, which was called during the evaluation of bar, during the evaluation of main. We provide a transformation that converts GHC Core programs into ones that pass a stack around, and a stack library that ensures bounded heap usage despite the highly recursive nature of Haskell. We call our extension to GHC StackTrace.
即使是Haskell程序偶尔也会出错。在空列表上调用head的程序和函数定义中的不完整模式可能导致程序崩溃,除了报告最终调用error的精确位置之外,几乎没有报告其他内容。被告知程序中head函数的一个应用程序出错了,而不知道是哪一个使用出错了,这可能会让人恼火。我们展示了在GHC中添加堆栈跟踪的能力,例如,我们的崩溃头在foo求值期间使用,它在bar求值期间被调用,在main求值期间。我们提供了一个转换,将GHC核心程序转换为传递堆栈的程序,以及一个堆栈库,尽管Haskell具有高度递归的特性,但它确保了有限的堆使用。我们调用我们的扩展到GHC StackTrace。
{"title":"Finding the needle: stack traces for GHC","authors":"T. O. R. Allwood, S. Jones, S. Eisenbach","doi":"10.1145/1596638.1596654","DOIUrl":"https://doi.org/10.1145/1596638.1596654","url":null,"abstract":"Even Haskell programs can occasionally go wrong. Programs calling head on an empty list, and incomplete patterns in function definitions can cause program crashes, reporting little more than the precise location where error was ultimately called. Being told that one application of the head function in your program went wrong, without knowing which use of head went wrong can be infuriating. We present our work on adding the ability to get stack traces out of GHC, for example that our crashing head was used during the evaluation of foo, which was called during the evaluation of bar, during the evaluation of main. We provide a transformation that converts GHC Core programs into ones that pass a stack around, and a stack library that ensures bounded heap usage despite the highly recursive nature of Haskell. We call our extension to GHC StackTrace.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"61 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127042551","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}
引用次数: 15
Losing functions without gaining data: another look at defunctionalisation 失去功能却没有获得数据:再看一下去功能化
Pub Date : 2009-09-03 DOI: 10.1145/1596638.1596641
Neil Mitchell, C. Runciman
We describe a transformation which takes a higher-order program, and produces an equivalent first-order program. Unlike Reynolds-style defunctionalisation, it does not introduce any new data types, and the results are more amenable to subsequent analysis operations. We can use our method to improve the results of existing analysis operations, including strictness analysis, pattern-match safety and termination checking. Our transformation is implemented, and works on a Core language to which Haskell programs can be reduced. Our method cannot always succeed in removing all functional values, but in practice is remarkably successful.
我们描述了一个变换,它取一个高阶程序,并产生一个等价的一阶程序。与雷诺兹式的去功能化不同,它不引入任何新的数据类型,结果更适合后续的分析操作。我们可以使用我们的方法来改进现有分析操作的结果,包括严格性分析、模式匹配安全性和终止检查。我们的转换被实现了,并且在一种Core语言上工作,Haskell程序可以简化为这种语言。我们的方法不能总是成功地去除所有的函数值,但在实践中是非常成功的。
{"title":"Losing functions without gaining data: another look at defunctionalisation","authors":"Neil Mitchell, C. Runciman","doi":"10.1145/1596638.1596641","DOIUrl":"https://doi.org/10.1145/1596638.1596641","url":null,"abstract":"We describe a transformation which takes a higher-order program, and produces an equivalent first-order program. Unlike Reynolds-style defunctionalisation, it does not introduce any new data types, and the results are more amenable to subsequent analysis operations. We can use our method to improve the results of existing analysis operations, including strictness analysis, pattern-match safety and termination checking. Our transformation is implemented, and works on a Core language to which Haskell programs can be reduced. Our method cannot always succeed in removing all functional values, but in practice is remarkably successful.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"23 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121402438","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
A compositional theory for STM Haskell STM Haskell的组合理论
Pub Date : 2009-09-03 DOI: 10.1145/1596638.1596648
J. Borgström, K. Bhargavan, A. Gordon
We address the problem of reasoning about Haskell programs that use Software Transactional Memory (STM). As a motivating example, we consider Haskell code for a concurrent non-deterministic tree rewriting algorithm implementing the operational semantics of the ambient calculus. The core of our theory is a uniform model, in the spirit of process calculi, of the run-time state of multi-threaded STM Haskell programs. The model was designed to simplify both local and compositional reasoning about STM programs. A single reduction relation captures both pure functional computations and also effectful computations in the STM and I/O monads. We state and prove liveness, soundness, completeness, safety, and termination properties relating source processes and their Haskell implementation. Our proof exploits various ideas from concurrency theory, such as the bisimulation technique, but in the setting of a widely used programming language rather than an abstract process calculus. Additionally, we develop an equational theory for reasoning about STM Haskell programs, and establish for the first time equations conjectured by the designers of STM Haskell. We conclude that using a pure functional language extended with STM facilitates reasoning about concurrent implementation code.
我们解决了使用软件事务性内存(STM)的Haskell程序的推理问题。作为一个激励的例子,我们考虑了一个并发非确定性树重写算法的Haskell代码,该算法实现了环境演算的操作语义。我们的理论的核心是一个统一的模型,在进程演算的精神,多线程STM Haskell程序的运行时状态。该模型旨在简化STM程序的局部推理和组合推理。一个简化关系既可以捕获纯函数计算,也可以捕获STM和I/O单子中的有效计算。我们陈述并证明了源进程及其Haskell实现的活动性、健全性、完整性、安全性和终止性。我们的证明利用了并发理论中的各种思想,例如双模拟技术,但采用的是广泛使用的编程语言,而不是抽象的过程演算。此外,我们发展了一个用于STM Haskell程序推理的方程理论,并首次建立了STM Haskell设计者推测的方程。我们得出的结论是,使用经过STM扩展的纯函数式语言有助于对并发实现代码进行推理。
{"title":"A compositional theory for STM Haskell","authors":"J. Borgström, K. Bhargavan, A. Gordon","doi":"10.1145/1596638.1596648","DOIUrl":"https://doi.org/10.1145/1596638.1596648","url":null,"abstract":"We address the problem of reasoning about Haskell programs that use Software Transactional Memory (STM). As a motivating example, we consider Haskell code for a concurrent non-deterministic tree rewriting algorithm implementing the operational semantics of the ambient calculus. The core of our theory is a uniform model, in the spirit of process calculi, of the run-time state of multi-threaded STM Haskell programs. The model was designed to simplify both local and compositional reasoning about STM programs. A single reduction relation captures both pure functional computations and also effectful computations in the STM and I/O monads. We state and prove liveness, soundness, completeness, safety, and termination properties relating source processes and their Haskell implementation. Our proof exploits various ideas from concurrency theory, such as the bisimulation technique, but in the setting of a widely used programming language rather than an abstract process calculus. Additionally, we develop an equational theory for reasoning about STM Haskell programs, and establish for the first time equations conjectured by the designers of STM Haskell. We conclude that using a pure functional language extended with STM facilitates reasoning about concurrent implementation code.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"12 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132532065","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}
引用次数: 5
期刊
ACM SIGPLAN Symposium/Workshop on Haskell
全部 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