首页 > 最新文献

ACM SIGPLAN Symposium/Workshop on Haskell最新文献

英文 中文
Prettier concurrency: purely functional concurrent revisions 更漂亮的并发性:纯函数并发修订
Pub Date : 2012-01-12 DOI: 10.1145/2034675.2034686
Daan Leijen, Manuel Fähndrich, S. Burckhardt
This article presents an extension to the work of Launchbury and Peyton-Jones on the ST monad. Using a novel model for concurrency, called concurrent revisions [3,5], we show how we can use concurrency together with imperative mutable variables, while still being able to safely convert such computations (in the Rev monad) into pure values again. In contrast to many other transaction models, like software transactional memory (STM), concurrent revisions never use rollback and always deterministically resolve conflicts. As a consequence, concurrent revisions integrate well with side-effecting I/O operations. Using deterministic conflict resolution, concurrent revisions can deal well with situations where there are many conflicts between different threads that modify a shared data structure. We demonstrate this by describing a concurrent game with conflicting concurrent tasks.
本文介绍了Launchbury和Peyton-Jones在ST单子上的工作的扩展。使用一种新的并发模型,称为并发修订[3,5],我们展示了如何将并发性与命令式可变变量一起使用,同时仍然能够安全地将此类计算(在Rev monad中)再次转换为纯值。与软件事务性内存(STM)等许多其他事务模型不同,并发修订从不使用回滚,并且总是确定地解决冲突。因此,并发修订可以很好地与副作用的I/O操作集成在一起。使用确定性冲突解决,并发修订可以很好地处理修改共享数据结构的不同线程之间存在许多冲突的情况。我们通过描述一个具有冲突并发任务的并发游戏来证明这一点。
{"title":"Prettier concurrency: purely functional concurrent revisions","authors":"Daan Leijen, Manuel Fähndrich, S. Burckhardt","doi":"10.1145/2034675.2034686","DOIUrl":"https://doi.org/10.1145/2034675.2034686","url":null,"abstract":"This article presents an extension to the work of Launchbury and Peyton-Jones on the ST monad. Using a novel model for concurrency, called concurrent revisions [3,5], we show how we can use concurrency together with imperative mutable variables, while still being able to safely convert such computations (in the Rev monad) into pure values again.\u0000 In contrast to many other transaction models, like software transactional memory (STM), concurrent revisions never use rollback and always deterministically resolve conflicts. As a consequence, concurrent revisions integrate well with side-effecting I/O operations. Using deterministic conflict resolution, concurrent revisions can deal well with situations where there are many conflicts between different threads that modify a shared data structure. We demonstrate this by describing a concurrent game with conflicting concurrent tasks.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"12 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2012-01-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123383544","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}
引用次数: 16
Towards Haskell in the cloud 走向云端的Haskell
Pub Date : 2012-01-12 DOI: 10.1145/2034675.2034690
J. Epstein, A. Black, S. Jones
We present Cloud Haskell, a domain-specific language for developing programs for a distributed computing environment. Implemented as a shallow embedding in Haskell, it provides a message-passing communication model, inspired by Erlang, without introducing incompatibility with Haskell's established shared-memory concurrency. A key contribution is a method for serializing function closures for transmission across the network. Cloud Haskell has been implemented; we present example code and some preliminary performance measurements.
我们介绍Cloud Haskell,一种用于为分布式计算环境开发程序的领域特定语言。它在Haskell中以浅嵌入的方式实现,提供了一种受Erlang启发的消息传递通信模型,而不会引入与Haskell已建立的共享内存并发性不兼容的问题。一个关键的贡献是一种序列化函数闭包以便在网络上传输的方法。云Haskell已经实现;我们提供了示例代码和一些初步的性能度量。
{"title":"Towards Haskell in the cloud","authors":"J. Epstein, A. Black, S. Jones","doi":"10.1145/2034675.2034690","DOIUrl":"https://doi.org/10.1145/2034675.2034690","url":null,"abstract":"We present Cloud Haskell, a domain-specific language for developing programs for a distributed computing environment. Implemented as a shallow embedding in Haskell, it provides a message-passing communication model, inspired by Erlang, without introducing incompatibility with Haskell's established shared-memory concurrency. A key contribution is a method for serializing function closures for transmission across the network. Cloud Haskell has been implemented; we present example code and some preliminary performance measurements.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"14 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2012-01-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121610022","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}
引用次数: 148
A monad for deterministic parallelism 确定性并行的单子
Pub Date : 2012-01-12 DOI: 10.1145/2034675.2034685
S. Marlow, Ryan Newton, S. Jones
We present a new programming model for deterministic parallel computation in a pure functional language. The model is monadic and has explicit granularity, but allows dynamic construction of dataflow networks that are scheduled at runtime, while remaining deterministic and pure. The implementation is based on monadic concurrency, which has until now only been used to simulate concurrency in functional languages, rather than to provide parallelism. We present the API with its semantics, and argue that parallel execution is deterministic. Furthermore, we present a complete work-stealing scheduler implemented as a Haskell library, and we show that it performs at least as well as the existing parallel programming models in Haskell.
在纯函数式语言中提出了一种新的确定性并行计算的编程模型。该模型是一元的,具有明确的粒度,但允许动态构建在运行时调度的数据流网络,同时保持确定性和纯粹性。该实现基于一元并发,到目前为止,它仅用于模拟函数式语言中的并发性,而不是提供并行性。我们展示了API及其语义,并论证了并行执行是确定性的。此外,我们提出了一个完整的工作窃取调度器实现为Haskell库,我们证明了它的执行至少和Haskell中现有的并行编程模型一样好。
{"title":"A monad for deterministic parallelism","authors":"S. Marlow, Ryan Newton, S. Jones","doi":"10.1145/2034675.2034685","DOIUrl":"https://doi.org/10.1145/2034675.2034685","url":null,"abstract":"We present a new programming model for deterministic parallel computation in a pure functional language. The model is monadic and has explicit granularity, but allows dynamic construction of dataflow networks that are scheduled at runtime, while remaining deterministic and pure. The implementation is based on monadic concurrency, which has until now only been used to simulate concurrency in functional languages, rather than to provide parallelism. We present the API with its semantics, and argue that parallel execution is deterministic. Furthermore, we present a complete work-stealing scheduler implemented as a Haskell library, and we show that it performs at least as well as the existing parallel programming models in Haskell.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"25 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2012-01-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128915916","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}
引用次数: 127
Hobbits for Haskell: a library for higher-order encodings in functional programming languages 用于Haskell的Hobbits:函数式编程语言的高阶编码库
Pub Date : 2012-01-12 DOI: 10.1145/2034675.2034681
Edwin M. Westbrook, N. Frisby, Paul Brauner
Adequate encodings are a powerful programming tool, which eliminate whole classes of program bugs: they ensure that a program cannot generate ill-formed data, because such data is not part of the representation; and they also ensure that a program is well-defined, meaning that it cannot have different behaviors on different representations of the same piece of data. Unfortunately, it has proven difficult to define adequate encodings of programming languages themselves. Such encodings would be very useful in language processing tools such as interpreters, compilers, model-checking tools, etc., as these systems are often difficult to get correct. The key problem in representing programming languages is in encoding binding constructs; previous approaches have serious limitations in either the operations they allow or the correcness guarantees they make. In this paper, we introduce a new library for Haskell that allows the user to define and use higher-order encodings, a powerful technique for representing bindings. Our library allows straightforward recursion on bindings using pattern-matching, which is not possible in previous approaches. We then demonstrate our library on a medium-sized example, lambda-lifting, showing how our library can be used to make strong correctness guarantees at compile time.
适当的编码是一种强大的编程工具,它可以消除所有类型的程序错误:它们确保程序不会生成格式错误的数据,因为这些数据不是表示的一部分;它们还确保程序是定义良好的,这意味着它不能对同一块数据的不同表示有不同的行为。不幸的是,事实证明很难为编程语言本身定义足够的编码。这种编码在语言处理工具(如解释器、编译器、模型检查工具等)中非常有用,因为这些系统通常很难得到正确的处理。表示编程语言的关键问题是对绑定结构进行编码;以前的方法在允许的操作或保证的正确性方面都有严重的限制。在本文中,我们为Haskell引入了一个新的库,它允许用户定义和使用高阶编码,这是一种表示绑定的强大技术。我们的库允许使用模式匹配对绑定进行直接递归,这在以前的方法中是不可能的。然后,我们在一个中等大小的例子上演示了我们的库,lambda-lifting,展示了如何使用我们的库在编译时提供强大的正确性保证。
{"title":"Hobbits for Haskell: a library for higher-order encodings in functional programming languages","authors":"Edwin M. Westbrook, N. Frisby, Paul Brauner","doi":"10.1145/2034675.2034681","DOIUrl":"https://doi.org/10.1145/2034675.2034681","url":null,"abstract":"Adequate encodings are a powerful programming tool, which eliminate whole classes of program bugs: they ensure that a program cannot generate ill-formed data, because such data is not part of the representation; and they also ensure that a program is well-defined, meaning that it cannot have different behaviors on different representations of the same piece of data. Unfortunately, it has proven difficult to define adequate encodings of programming languages themselves. Such encodings would be very useful in language processing tools such as interpreters, compilers, model-checking tools, etc., as these systems are often difficult to get correct. The key problem in representing programming languages is in encoding binding constructs; previous approaches have serious limitations in either the operations they allow or the correcness guarantees they make. In this paper, we introduce a new library for Haskell that allows the user to define and use higher-order encodings, a powerful technique for representing bindings. Our library allows straightforward recursion on bindings using pattern-matching, which is not possible in previous approaches. We then demonstrate our library on a medium-sized example, lambda-lifting, showing how our library can be used to make strong correctness guarantees at compile time.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"13 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2012-01-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115249325","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
Bringing back monad comprehensions 回到单子推导式
Pub Date : 2012-01-12 DOI: 10.1145/2034675.2034678
George Giorgidze, Torsten Grust, Nils Schweinsberg, J. Weijers
This paper is about a Glasgow Haskell Compiler (GHC) extension that generalises Haskell's list comprehension notation to monads. The monad comprehension notation implemented by the extension supports generator and filter clauses, as was the case in the Haskell 1.4 standard. In addition, the extension generalises the recently proposed parallel and SQL-like list comprehension notations to monads. The aforementioned generalisations are formally defined in this paper. The extension will be available in GHC 7.2. This paper gives several instructive examples that we hope will facilitate wide adoption of the extension by the Haskell community. We also argue why the do notation is not always a good fit for monadic libraries and embedded domain-specific languages, especially for those that are based on collection monads. Should the question of how to integrate the extension into the Haskell standard arise, the paper proposes a solution to the problem that led to the removal of the monad comprehension notation from the language standard.
本文是关于格拉斯哥Haskell编译器(GHC)扩展,它将Haskell的列表推导符号推广到单子。扩展实现的单子理解表示法支持生成器和过滤器子句,就像Haskell 1.4标准中的情况一样。此外,该扩展将最近提出的并行和类似sql的列表推导符号推广到单子。本文对上述概括进行了正式定义。该扩展将在GHC 7.2中提供。本文给出了几个有指导意义的例子,我们希望这些例子能够促进Haskell社区广泛采用该扩展。我们还讨论了为什么do符号并不总是适合单元库和嵌入式特定于领域的语言,特别是那些基于集合单元的语言。如果出现如何将扩展集成到Haskell标准中的问题,本文提出了一个解决方案,以解决导致从语言标准中删除monad理解符号的问题。
{"title":"Bringing back monad comprehensions","authors":"George Giorgidze, Torsten Grust, Nils Schweinsberg, J. Weijers","doi":"10.1145/2034675.2034678","DOIUrl":"https://doi.org/10.1145/2034675.2034678","url":null,"abstract":"This paper is about a Glasgow Haskell Compiler (GHC) extension that generalises Haskell's list comprehension notation to monads. The monad comprehension notation implemented by the extension supports generator and filter clauses, as was the case in the Haskell 1.4 standard. In addition, the extension generalises the recently proposed parallel and SQL-like list comprehension notations to monads. The aforementioned generalisations are formally defined in this paper. The extension will be available in GHC 7.2.\u0000 This paper gives several instructive examples that we hope will facilitate wide adoption of the extension by the Haskell community. We also argue why the do notation is not always a good fit for monadic libraries and embedded domain-specific languages, especially for those that are based on collection monads. Should the question of how to integrate the extension into the Haskell standard arise, the paper proposes a solution to the problem that led to the removal of the monad comprehension notation from the language standard.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"91 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2012-01-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131305736","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}
引用次数: 24
Flexible dynamic information flow control in Haskell Haskell灵活的动态信息流控制
Pub Date : 2012-01-12 DOI: 10.1145/2034675.2034688
D. Stefan, Alejandro Russo, John C. Mitchell, David Mazières
We describe a new, dynamic, floating-label approach to language-based information flow control, and present an implementation in Haskell. A labeled IO monad, LIO, keeps track of a current label and permits restricted access to IO functionality, while ensuring that the current label exceeds the labels of all data observed and restricts what can be modified. Unlike other language-based work, LIO also bounds the current label with a current clearance that provides a form of discretionary access control. In addition, programs may encapsulate and pass around the results of computations with different labels. We give precise semantics and prove confidentiality and integrity properties of the system.
我们描述了一种新的、动态的、浮动标签的方法来实现基于语言的信息流控制,并给出了一个在Haskell中的实现。有标签的IO单子(LIO)跟踪当前标签,并允许对IO功能的受限访问,同时确保当前标签超过观察到的所有数据的标签,并限制可以修改的内容。与其他基于语言的工作不同,LIO还使用当前清除限制当前标签,这提供了一种自由访问控制形式。此外,程序可以用不同的标签封装和传递计算结果。我们给出了精确的语义,并证明了系统的机密性和完整性。
{"title":"Flexible dynamic information flow control in Haskell","authors":"D. Stefan, Alejandro Russo, John C. Mitchell, David Mazières","doi":"10.1145/2034675.2034688","DOIUrl":"https://doi.org/10.1145/2034675.2034688","url":null,"abstract":"We describe a new, dynamic, floating-label approach to language-based information flow control, and present an implementation in Haskell. A labeled IO monad, LIO, keeps track of a current label and permits restricted access to IO functionality, while ensuring that the current label exceeds the labels of all data observed and restricts what can be modified. Unlike other language-based work, LIO also bounds the current label with a current clearance that provides a form of discretionary access control. In addition, programs may encapsulate and pass around the results of computations with different labels. We give precise semantics and prove confidentiality and integrity properties of the system.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2012-01-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129099359","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}
引用次数: 164
An llVM backend for GHC 用于GHC的llVM后端
Pub Date : 2010-11-17 DOI: 10.1145/1863523.1863538
David Terei, M. Chakravarty
In the presence of ever-changing computer architectures, high-quality optimising compiler backends are moving targets that require specialist knowledge and sophisticated algorithms. In this paper, we explore a new backend for the Glasgow Haskell Compiler (GHC) that leverages the Low Level Virtual Machine (LLVM), a new breed of compiler written explicitly for use by other compiler writers, not high-level programmers, that promises to enable outsourcing of low-level and architecture-dependent aspects of code generation. We discuss the conceptual challenges and our backend design. We also provide an extensive quantitative evaluation of the performance of the backend and of the code it produces.
在不断变化的计算机体系结构中,高质量的优化编译器后端是移动的目标,需要专业知识和复杂的算法。在本文中,我们探索了格拉斯哥Haskell编译器(GHC)的一个新的后端,它利用了低级虚拟机(LLVM),这是一种新的编译器,明确地为其他编译器编写者而不是高级程序员使用,它承诺将代码生成的低级和依赖于体系结构的方面外包。我们讨论了概念上的挑战和后端设计。我们还对后端及其生成的代码的性能进行了广泛的定量评估。
{"title":"An llVM backend for GHC","authors":"David Terei, M. Chakravarty","doi":"10.1145/1863523.1863538","DOIUrl":"https://doi.org/10.1145/1863523.1863538","url":null,"abstract":"In the presence of ever-changing computer architectures, high-quality optimising compiler backends are moving targets that require specialist knowledge and sophisticated algorithms. In this paper, we explore a new backend for the Glasgow Haskell Compiler (GHC) that leverages the Low Level Virtual Machine (LLVM), a new breed of compiler written explicitly for use by other compiler writers, not high-level programmers, that promises to enable outsourcing of low-level and architecture-dependent aspects of code generation. We discuss the conceptual challenges and our backend design. We also provide an extensive quantitative evaluation of the performance of the backend and of the code it produces.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"23 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-11-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"117012565","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}
引用次数: 39
Nikola: embedding compiled GPU functions in Haskell Nikola:在Haskell中嵌入编译后的GPU函数
Pub Date : 2010-11-17 DOI: 10.1145/1863523.1863533
G. Mainland, Greg Morrisett
We describe Nikola, a first-order language of array computations embedded in Haskell that compiles to GPUs via CUDA using a new set of type-directed techniques to support re-usable computations. Nikola automatically handles a range of low-level details for Haskell programmers, such as marshaling data to/from the GPU, size inference for buffers, memory management, and automatic loop parallelization. Additionally, Nikola supports both compile-time and run-time code generation, making it possible for programmers to choose when and where to specialize embedded programs.
我们描述了Nikola,一种嵌入在Haskell中的一阶数组计算语言,它通过CUDA编译为gpu,使用一组新的类型导向技术来支持可重用的计算。Nikola为Haskell程序员自动处理一系列底层细节,比如收发GPU数据、缓冲区大小推断、内存管理和自动循环并行化。此外,Nikola支持编译时和运行时代码生成,使程序员可以选择何时何地专门编写嵌入式程序。
{"title":"Nikola: embedding compiled GPU functions in Haskell","authors":"G. Mainland, Greg Morrisett","doi":"10.1145/1863523.1863533","DOIUrl":"https://doi.org/10.1145/1863523.1863533","url":null,"abstract":"We describe Nikola, a first-order language of array computations embedded in Haskell that compiles to GPUs via CUDA using a new set of type-directed techniques to support re-usable computations. Nikola automatically handles a range of low-level details for Haskell programmers, such as marshaling data to/from the GPU, size inference for buffers, memory management, and automatic loop parallelization. Additionally, Nikola supports both compile-time and run-time code generation, making it possible for programmers to choose when and where to specialize embedded programs.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"6 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-11-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128381105","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
The performance of the Haskell containers package Haskell容器包的性能
Pub Date : 2010-11-17 DOI: 10.1145/1863523.1863526
Milan Straka
In this paper, we perform a thorough performance analysis of the containers package, the de facto standard Haskell containers library, comparing it to the most of existing alternatives on HackageDB. We then significantly improve its performance, making it comparable to the best implementations available. Additionally, we describe a new persistent data structure based on hashing, which offers the best performance out of available data structures containing Strings and ByteStrings.
在本文中,我们对容器包(事实上的标准Haskell容器库)进行了彻底的性能分析,并将其与HackageDB上的大多数现有替代方案进行了比较。然后,我们显著提高了它的性能,使其与现有的最佳实现相媲美。此外,我们描述了一种基于散列的新的持久数据结构,它在包含string和bytestring的可用数据结构中提供了最佳性能。
{"title":"The performance of the Haskell containers package","authors":"Milan Straka","doi":"10.1145/1863523.1863526","DOIUrl":"https://doi.org/10.1145/1863523.1863526","url":null,"abstract":"In this paper, we perform a thorough performance analysis of the containers package, the de facto standard Haskell containers library, comparing it to the most of existing alternatives on HackageDB. We then significantly improve its performance, making it comparable to the best implementations available. Additionally, we describe a new persistent data structure based on hashing, which offers the best performance out of available data structures containing Strings and ByteStrings.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"9 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-11-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121830933","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}
引用次数: 6
A systematic derivation of the STG machine verified in Coq 在Coq中验证了STG机的系统推导
Pub Date : 2010-11-17 DOI: 10.1145/1863523.1863528
Maciej Piróg, Dariusz Biernacki
Shared Term Graph (STG) is a lazy functional language used as an intermediate language in the Glasgow Haskell Compiler (GHC). In this article, we present a natural operational semantics for STG and we mechanically derive a lazy abstract machine from this semantics, which turns out to coincide with Peyton-Jones and Salkild's Spineless Tagless G-machine (STG machine) used in GHC. Unlike other constructions of STG-like machines present in the literature, ours is based on a systematic and scalable derivation method (inspired by Danvy et al.'s functional correspondence between evaluators and abstract machines) and it leads to an abstract machine that differs from the original STG machine only in inessential details. In particular, it handles non-trivial update scenarios and partial applications identically as the STG machine. The entire derivation has been formalized in the Coq proof assistant. Thus, in effect, we provide a machine checkable proof of the correctness of the STG machine with respect to the natural semantics.
共享术语图(STG)是一种惰性函数式语言,在格拉斯哥Haskell编译器(GHC)中用作中间语言。在本文中,我们为STG提供了一个自然的操作语义,并从这个语义机械地推导出一个懒惰的抽象机器,这与Peyton-Jones和Salkild在GHC中使用的无Spineless Tagless G-machine (STG machine)一致。与文献中其他类似STG的机器结构不同,我们的方法是基于系统和可扩展的推导方法(灵感来自Danvy等人的评估器和抽象机器之间的功能对应关系),它导致抽象机器与原始STG机器仅在无关紧要的细节上有所不同。特别是,它处理重要的更新场景和部分应用程序的方式与STG机器相同。整个推导过程已经在Coq证明助手中形式化了。因此,实际上,我们提供了一个机器可检查的关于自然语义的STG机器正确性的证明。
{"title":"A systematic derivation of the STG machine verified in Coq","authors":"Maciej Piróg, Dariusz Biernacki","doi":"10.1145/1863523.1863528","DOIUrl":"https://doi.org/10.1145/1863523.1863528","url":null,"abstract":"Shared Term Graph (STG) is a lazy functional language used as an intermediate language in the Glasgow Haskell Compiler (GHC). In this article, we present a natural operational semantics for STG and we mechanically derive a lazy abstract machine from this semantics, which turns out to coincide with Peyton-Jones and Salkild's Spineless Tagless G-machine (STG machine) used in GHC. Unlike other constructions of STG-like machines present in the literature, ours is based on a systematic and scalable derivation method (inspired by Danvy et al.'s functional correspondence between evaluators and abstract machines) and it leads to an abstract machine that differs from the original STG machine only in inessential details. In particular, it handles non-trivial update scenarios and partial applications identically as the STG machine.\u0000 The entire derivation has been formalized in the Coq proof assistant. Thus, in effect, we provide a machine checkable proof of the correctness of the STG machine with respect to the natural semantics.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"29 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-11-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129450600","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}
引用次数: 21
期刊
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