首页 > 最新文献

ACM SIGPLAN Symposium/Workshop on Haskell最新文献

英文 中文
Data flow fusion with series expressions in Haskell Haskell中数据流与序列表达式的融合
Pub Date : 2013-09-23 DOI: 10.1145/2503778.2503782
B. Lippmeier, M. Chakravarty, G. Keller, Amos Robinson
Existing approaches to array fusion can deal with straight-line producer consumer pipelines, but cannot fuse branching data flows where a generated array is consumed by several different consumers. Branching data flows are common and natural to write, but a lack of fusion leads to the creation of an intermediate array at every branch point. We present a new array fusion system that handles branches, based on Waters's series expression framework, but extended to work in a functional setting. Our system also solves a related problem in stream fusion, namely the introduction of duplicate loop counters. We demonstrate speedup over existing fusion systems for several key examples.
现有的数组融合方法可以处理直线生产者和消费者管道,但不能融合分支数据流,其中生成的数组由几个不同的消费者消费。分支数据流很常见,编写起来也很自然,但是缺少融合会导致在每个分支点创建一个中间数组。我们提出了一个新的阵列融合系统,处理分支,基于Waters的系列表达式框架,但扩展到一个功能设置的工作。我们的系统还解决了流融合中的一个相关问题,即重复循环计数器的引入。我们用几个关键的例子演示了现有融合系统的加速。
{"title":"Data flow fusion with series expressions in Haskell","authors":"B. Lippmeier, M. Chakravarty, G. Keller, Amos Robinson","doi":"10.1145/2503778.2503782","DOIUrl":"https://doi.org/10.1145/2503778.2503782","url":null,"abstract":"Existing approaches to array fusion can deal with straight-line producer consumer pipelines, but cannot fuse branching data flows where a generated array is consumed by several different consumers. Branching data flows are common and natural to write, but a lack of fusion leads to the creation of an intermediate array at every branch point. We present a new array fusion system that handles branches, based on Waters's series expression framework, but extended to work in a functional setting. Our system also solves a related problem in stream fusion, namely the introduction of duplicate loop counters. We demonstrate speedup over existing fusion systems for several key examples.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"33 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2013-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"134490507","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
Mio: a high-performance multicore io manager for GHC Mio: GHC的高性能多核io管理器
Pub Date : 2013-09-23 DOI: 10.1145/2503778.2503790
A. Voellmy, Junchang Wang, P. Hudak, Kazuhiko Yamamoto
Haskell threads provide a key, lightweight concurrency abstraction to simplify the programming of important network applications such as web servers and software-defined network (SDN) controllers. The flagship Glasgow Haskell Compiler (GHC) introduces a run-time system (RTS) to achieve a high-performance multicore implementation of Haskell threads, by introducing effective components such as a multicore scheduler, a parallel garbage collector, an IO manager, and efficient multicore memory allocation. Evaluations of the GHC RTS, however, show that it does not scale well on multicore processors, leading to poor performance of many network applications that try to use lightweight Haskell threads. In this paper, we show that the GHC IO manager, which is a crucial component of the GHC RTS, is the scaling bottleneck. Through a series of experiments, we identify key data structure, scheduling, and dispatching bottlenecks of the GHC IO manager. We then design a new multicore IO manager named Mio that eliminates all these bottlenecks. Our evaluations show that the new Mio manager improves realistic web server throughput by 6.5x and reduces expected web server response time by 5.7x. We also show that with Mio, McNettle (an SDN controller written in Haskell) can scale effectively to 40+ cores, reach a throughput of over 20 million new requests per second on a single machine, and hence become the fastest of all existing SDN controllers.
Haskell线程提供了一个关键的轻量级并发抽象,以简化重要网络应用程序(如web服务器和软件定义网络(SDN)控制器)的编程。旗舰产品格拉斯哥Haskell编译器(GHC)引入了一个运行时系统(RTS),通过引入有效的组件,如多核调度程序、并行垃圾收集器、IO管理器和高效的多核内存分配,来实现高性能的多核Haskell线程实现。然而,对GHC RTS的评估表明,它不能很好地在多核处理器上扩展,导致许多尝试使用轻量级Haskell线程的网络应用程序性能不佳。在本文中,我们证明了GHC IO管理器是GHC RTS的关键组件,是可扩展性的瓶颈。通过一系列实验,我们确定了GHC IO管理器的关键数据结构、调度和调度瓶颈。然后,我们设计了一个新的多核IO管理器,名为Mio,它消除了所有这些瓶颈。我们的评估表明,新的Mio管理器将实际的web服务器吞吐量提高了6.5倍,并将预期的web服务器响应时间减少了5.7倍。我们还表明,使用Mio, McNettle(用Haskell编写的SDN控制器)可以有效地扩展到40+核,在一台机器上达到每秒超过2000万个新请求的吞吐量,因此成为所有现有SDN控制器中最快的。
{"title":"Mio: a high-performance multicore io manager for GHC","authors":"A. Voellmy, Junchang Wang, P. Hudak, Kazuhiko Yamamoto","doi":"10.1145/2503778.2503790","DOIUrl":"https://doi.org/10.1145/2503778.2503790","url":null,"abstract":"Haskell threads provide a key, lightweight concurrency abstraction to simplify the programming of important network applications such as web servers and software-defined network (SDN) controllers. The flagship Glasgow Haskell Compiler (GHC) introduces a run-time system (RTS) to achieve a high-performance multicore implementation of Haskell threads, by introducing effective components such as a multicore scheduler, a parallel garbage collector, an IO manager, and efficient multicore memory allocation. Evaluations of the GHC RTS, however, show that it does not scale well on multicore processors, leading to poor performance of many network applications that try to use lightweight Haskell threads. In this paper, we show that the GHC IO manager, which is a crucial component of the GHC RTS, is the scaling bottleneck. Through a series of experiments, we identify key data structure, scheduling, and dispatching bottlenecks of the GHC IO manager. We then design a new multicore IO manager named Mio that eliminates all these bottlenecks. Our evaluations show that the new Mio manager improves realistic web server throughput by 6.5x and reduces expected web server response time by 5.7x. We also show that with Mio, McNettle (an SDN controller written in Haskell) can scale effectively to 40+ cores, reach a throughput of over 20 million new requests per second on a single machine, and hence become the fastest of all existing SDN controllers.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"10 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2013-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"114214814","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}
引用次数: 11
Shrinking and showing functions: (functional pearl) 收缩显示功能:(功能珍珠)
Pub Date : 2013-01-17 DOI: 10.1145/2364506.2364516
Koen Claessen
Although quantification over functions in QuickCheck properties has been supported from the beginning, displaying and shrinking them as counter examples has not. The reason is that in general, functions are infinite objects, which means that there is no sensible show function for them, and shrinking an infinite object within a finite number of steps seems impossible. This paper presents a general technique with which functions as counter examples can be shrunk to finite objects, which can then be displayed to the user. The approach turns out to be practically usable, which is shown by a number of examples. The two main limitations are that higher-order functions cannot be dealt with, and it is hard to deal with terms that contain functions as subterms.
虽然QuickCheck属性中对函数的量化从一开始就支持,但作为反例显示和缩小它们却不支持。原因是,一般来说,函数是无限的对象,这意味着它们没有明显的显示函数,在有限的步骤中缩小一个无限的对象似乎是不可能的。本文提出了一种通用技术,该技术可以将反例函数缩小为有限的对象,然后可以向用户显示。实例表明,该方法是实用的。两个主要的限制是不能处理高阶函数,并且很难处理包含函数作为子项的项。
{"title":"Shrinking and showing functions: (functional pearl)","authors":"Koen Claessen","doi":"10.1145/2364506.2364516","DOIUrl":"https://doi.org/10.1145/2364506.2364516","url":null,"abstract":"Although quantification over functions in QuickCheck properties has been supported from the beginning, displaying and shrinking them as counter examples has not. The reason is that in general, functions are infinite objects, which means that there is no sensible show function for them, and shrinking an infinite object within a finite number of steps seems impossible. This paper presents a general technique with which functions as counter examples can be shrunk to finite objects, which can then be displayed to the user. The approach turns out to be practically usable, which is shown by a number of examples. The two main limitations are that higher-order functions cannot be dealt with, and it is hard to deal with terms that contain functions as subterms.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"199 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2013-01-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115686094","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
Template your boilerplate: using template haskell for efficient generic programming 模板化你的样板:使用模板haskell进行高效的泛型编程
Pub Date : 2013-01-17 DOI: 10.1145/2364506.2364509
Michael D. Adams, Thomas Dubuisson
Generic programming allows the concise expression of algorithms that would otherwise require large amounts of handwritten code. A number of such systems have been developed over the years, but a common drawback of these systems is poor runtime performance relative to handwritten, non-generic code. Generic-programming systems vary significantly in this regard, but few consistently match the performance of handwritten code. This poses a dilemma for developers. Generic-programming systems offer concision but cost performance. Handwritten code offers performance but costs concision. This paper explores the use of Template Haskell to achieve the best of both worlds. It presents a generic-programming system for Haskell that provides both the concision of other generic-programming systems and the efficiency of handwritten code. Our system gives the programmer a high-level, generic-programming interface, but uses Template Haskell to generate efficient, non-generic code that outperforms existing generic-programming systems for Haskell. This paper presents the results of benchmarking our system against both handwritten code and several other generic-programming systems. In these benchmarks, our system matches the performance of handwritten code while other systems average anywhere from two to twenty times slower.
泛型编程允许对算法进行简洁的表达,否则将需要大量的手写代码。多年来已经开发了许多这样的系统,但是这些系统的一个共同缺点是相对于手写的非泛型代码,运行时性能较差。泛型编程系统在这方面差别很大,但很少有系统能始终与手写代码的性能相匹配。这给开发者带来了两难境地。泛型编程系统提供简洁但性价比高的功能。手写代码提供性能,但成本简洁。本文探讨了如何使用Template Haskell来实现这两个世界的最佳效果。它提出了一个用于Haskell的泛型编程系统,它既提供了其他泛型编程系统的简便性,又提供了手写代码的效率。我们的系统为程序员提供了一个高级的泛型编程接口,但使用模板Haskell生成高效的非泛型代码,这些代码优于现有的Haskell泛型编程系统。本文介绍了将我们的系统与手写代码和其他几种泛型编程系统进行基准测试的结果。在这些基准测试中,我们的系统与手写代码的性能相当,而其他系统的平均速度要慢2到20倍。
{"title":"Template your boilerplate: using template haskell for efficient generic programming","authors":"Michael D. Adams, Thomas Dubuisson","doi":"10.1145/2364506.2364509","DOIUrl":"https://doi.org/10.1145/2364506.2364509","url":null,"abstract":"Generic programming allows the concise expression of algorithms that would otherwise require large amounts of handwritten code. A number of such systems have been developed over the years, but a common drawback of these systems is poor runtime performance relative to handwritten, non-generic code. Generic-programming systems vary significantly in this regard, but few consistently match the performance of handwritten code. This poses a dilemma for developers. Generic-programming systems offer concision but cost performance. Handwritten code offers performance but costs concision.\u0000 This paper explores the use of Template Haskell to achieve the best of both worlds. It presents a generic-programming system for Haskell that provides both the concision of other generic-programming systems and the efficiency of handwritten code. Our system gives the programmer a high-level, generic-programming interface, but uses Template Haskell to generate efficient, non-generic code that outperforms existing generic-programming systems for Haskell.\u0000 This paper presents the results of benchmarking our system against both handwritten code and several other generic-programming systems. In these benchmarks, our system matches the performance of handwritten code while other systems average anywhere from two to twenty times slower.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"90 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2013-01-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"114676179","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}
引用次数: 17
Feat: functional enumeration of algebraic types 功能:代数类型的函数枚举
Pub Date : 2013-01-17 DOI: 10.1145/2364506.2364515
Jonas Duregård, Patrik Jansson, Meng Wang
In mathematics, an enumeration of a set S is a bijective function from (an initial segment of) the natural numbers to S. We define "functional enumerations" as efficiently computable such bijections. This paper describes a theory of functional enumeration and provides an algebra of enumerations closed under sums, products, guarded recursion and bijections. We partition each enumerated set into numbered, finite subsets. We provide a generic enumeration such that the number of each part corresponds to the size of its values (measured in the number of constructors). We implement our ideas in a Haskell library called testing-feat, and make the source code freely available. Feat provides efficient "random access" to enumerated values. The primary application is property-based testing, where it is used to define both random sampling (for example QuickCheck generators) and exhaustive enumeration (in the style of SmallCheck). We claim that functional enumeration is the best option for automatically generating test cases from large groups of mutually recursive syntax tree types. As a case study we use Feat to test the pretty-printer of the Template Haskell library (uncovering several bugs).
在数学中,集合S的枚举是一个从自然数到S的双射函数,我们将“泛函枚举”定义为可有效计算的这种双射。本文描述了一个泛函枚举理论,并给出了一个闭于和、积、保护递归和双射下的枚举代数。我们将每个枚举集划分为有编号的有限子集。我们提供了一个泛型枚举,使得每个部分的数量对应于其值的大小(以构造函数的数量衡量)。我们在一个名为testingfeat的Haskell库中实现了我们的想法,并免费提供源代码。Feat提供了对枚举值的高效“随机访问”。主要的应用是基于属性的测试,它被用来定义随机抽样(例如QuickCheck生成器)和穷举枚举(以SmallCheck的风格)。我们声称函数枚举是从大量相互递归语法树类型中自动生成测试用例的最佳选择。作为一个案例研究,我们使用Feat来测试Template Haskell库的漂亮打印机(发现了几个错误)。
{"title":"Feat: functional enumeration of algebraic types","authors":"Jonas Duregård, Patrik Jansson, Meng Wang","doi":"10.1145/2364506.2364515","DOIUrl":"https://doi.org/10.1145/2364506.2364515","url":null,"abstract":"In mathematics, an enumeration of a set S is a bijective function from (an initial segment of) the natural numbers to S. We define \"functional enumerations\" as efficiently computable such bijections. This paper describes a theory of functional enumeration and provides an algebra of enumerations closed under sums, products, guarded recursion and bijections. We partition each enumerated set into numbered, finite subsets.\u0000 We provide a generic enumeration such that the number of each part corresponds to the size of its values (measured in the number of constructors). We implement our ideas in a Haskell library called testing-feat, and make the source code freely available. Feat provides efficient \"random access\" to enumerated values. The primary application is property-based testing, where it is used to define both random sampling (for example QuickCheck generators) and exhaustive enumeration (in the style of SmallCheck). We claim that functional enumeration is the best option for automatically generating test cases from large groups of mutually recursive syntax tree types. As a case study we use Feat to test the pretty-printer of the Template Haskell library (uncovering several bugs).","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"40 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2013-01-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131045228","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}
引用次数: 65
Dependently typed programming with singletons 使用单例的依赖类型编程
Pub Date : 2013-01-17 DOI: 10.1145/2364506.2364522
R. Eisenberg, Stephanie Weirich
Haskell programmers have been experimenting with dependent types for at least a decade, using clever encodings that push the limits of the Haskell type system. However, the cleverness of these encodings is also their main drawback. Although the ideas are inspired by dependently typed programs, the code looks significantly different. As a result, GHC implementors have responded with extensions to Haskell's type system, such as GADTs, type families, and datatype promotion. However, there remains a significant difference between programming in Haskell and in full-spectrum dependently typed languages. Haskell enforces a phase separation between runtime values and compile-time types. Therefore, singleton types are necessary to express the dependency between values and types. These singleton types introduce overhead and redundancy for the programmer. This paper presents the singletons library, which generates the boilerplate code necessary for dependently typed programming using GHC. To compare with full-spectrum languages, we present an extended example based on an Agda interface for safe database access. The paper concludes with a detailed discussion on the current capabilities of GHC for dependently typed programming and suggestions for future extensions to better support this style of programming.
Haskell程序员已经尝试依赖类型至少十年了,他们使用巧妙的编码突破了Haskell类型系统的极限。然而,这些编码的聪明也是它们的主要缺点。虽然这些想法是受依赖类型程序的启发,但代码看起来却有很大的不同。因此,GHC实现者对Haskell的类型系统进行了扩展,如gadt、类型族和数据类型提升。然而,在Haskell和全依赖类型语言中编程仍然有显著的区别。Haskell强制在运行时值和编译时类型之间进行阶段分离。因此,必须使用单例类型来表示值和类型之间的依赖关系。这些单例类型给程序员带来了开销和冗余。本文介绍了单例库,它生成了使用GHC进行依赖类型编程所需的样板代码。为了与全谱语言进行比较,我们给出了一个基于Agda接口的扩展示例,用于安全访问数据库。本文最后详细讨论了GHC当前在依赖类型编程方面的能力,并对未来的扩展提出了建议,以更好地支持这种编程风格。
{"title":"Dependently typed programming with singletons","authors":"R. Eisenberg, Stephanie Weirich","doi":"10.1145/2364506.2364522","DOIUrl":"https://doi.org/10.1145/2364506.2364522","url":null,"abstract":"Haskell programmers have been experimenting with dependent types for at least a decade, using clever encodings that push the limits of the Haskell type system. However, the cleverness of these encodings is also their main drawback. Although the ideas are inspired by dependently typed programs, the code looks significantly different. As a result, GHC implementors have responded with extensions to Haskell's type system, such as GADTs, type families, and datatype promotion. However, there remains a significant difference between programming in Haskell and in full-spectrum dependently typed languages. Haskell enforces a phase separation between runtime values and compile-time types. Therefore, singleton types are necessary to express the dependency between values and types. These singleton types introduce overhead and redundancy for the programmer.\u0000 This paper presents the singletons library, which generates the boilerplate code necessary for dependently typed programming using GHC. To compare with full-spectrum languages, we present an extended example based on an Agda interface for safe database access. The paper concludes with a detailed discussion on the current capabilities of GHC for dependently typed programming and suggestions for future extensions to better support this style of programming.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"146 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2013-01-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129059500","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}
引用次数: 74
The HERMIT in the machine: a plugin for the interactive transformation of GHC core language programs 机器中的HERMIT:用于GHC核心语言程序交互转换的插件
Pub Date : 2013-01-17 DOI: 10.1145/2364506.2364508
Andrew Farmer, Andy Gill, E. Komp, Neil Sculthorpe
The importance of reasoning about and refactoring programs is a central tenet of functional programming. Yet our compilers and development toolchains only provide rudimentary support for these tasks. This paper introduces a programmatic and compiler-centric interface that facilitates refactoring and equational reasoning. To develop our ideas, we have implemented HERMIT, a toolkit enabling informal but systematic transformation of Haskell programs from inside the Glasgow Haskell Compiler's optimization pipeline. With HERMIT, users can experiment with optimizations and equational reasoning, while the tedious heavy lifting of performing the actual transformations is done for them. HERMIT provides a transformation API that can be used to build higher-level rewrite tools. One use-case is prototyping new optimizations as clients of this API before being committed to the GHC toolchain. We describe a HERMIT application - a read-eval-print shell for performing transformations using HERMIT. We also demonstrate using this shell to prototype an optimization on a specific example, and report our initial experiences and remaining challenges.
对程序进行推理和重构的重要性是函数式编程的核心原则。然而,我们的编译器和开发工具链仅为这些任务提供基本的支持。本文介绍了一个以编程和编译器为中心的接口,它有助于重构和等式推理。为了实现我们的想法,我们实现了HERMIT,这是一个工具箱,可以从格拉斯哥Haskell编译器的优化管道内部对Haskell程序进行非正式但系统的转换。使用HERMIT,用户可以尝试优化和式推理,而执行实际转换的繁琐工作则由他们完成。HERMIT提供了一个转换API,可用于构建更高级的重写工具。一个用例是在提交到GHC工具链之前,作为这个API的客户端对新的优化进行原型设计。我们将描述一个HERMIT应用程序——一个读取-执行-打印shell,用于使用HERMIT执行转换。我们还演示了如何使用这个shell对一个特定示例进行原型化优化,并报告了我们的初步经验和仍然存在的挑战。
{"title":"The HERMIT in the machine: a plugin for the interactive transformation of GHC core language programs","authors":"Andrew Farmer, Andy Gill, E. Komp, Neil Sculthorpe","doi":"10.1145/2364506.2364508","DOIUrl":"https://doi.org/10.1145/2364506.2364508","url":null,"abstract":"The importance of reasoning about and refactoring programs is a central tenet of functional programming. Yet our compilers and development toolchains only provide rudimentary support for these tasks. This paper introduces a programmatic and compiler-centric interface that facilitates refactoring and equational reasoning. To develop our ideas, we have implemented HERMIT, a toolkit enabling informal but systematic transformation of Haskell programs from inside the Glasgow Haskell Compiler's optimization pipeline. With HERMIT, users can experiment with optimizations and equational reasoning, while the tedious heavy lifting of performing the actual transformations is done for them.\u0000 HERMIT provides a transformation API that can be used to build higher-level rewrite tools. One use-case is prototyping new optimizations as clients of this API before being committed to the GHC toolchain. We describe a HERMIT application - a read-eval-print shell for performing transformations using HERMIT. We also demonstrate using this shell to prototype an optimization on a specific example, and report our initial experiences and remaining challenges.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"31 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2013-01-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122597012","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}
引用次数: 33
Surveyor: a DSEL for representing and analyzing strongly typed surveys Surveyor:用于表示和分析强类型调查的DSEL
Pub Date : 2013-01-17 DOI: 10.1145/2364506.2364518
W. Allen, Martin Erwig
Polls and surveys are increasingly employed to gather information about attitudes and experiences of all kinds of populations and user groups. The ultimate purpose of a survey is to identify trends and relationships that can inform decision makers. To this end, the data gathered by a survey must be appropriately analyzed. Most of the currently existing tools focus on the user interface aspect of the data collection task, but pay little attention to the structure and type of the collected data, which are usually represented as potentially tag-annotated, but otherwise unstructured, plain text. This makes the task of writing data analysis programs often difficult and error-prone, whereas a typed data representation could support the writing of type-directed data analysis tools that would enjoy the many benefits of static typing. In this paper we present Surveyor, a DSEL that allows the compositional construction of typed surveys, where the types describe the structure of the data to be collected. A survey can be run to gather typed data, which can then be subjected to analysis tools that are built using Surveyor's typed combinators. Altogether the Surveyor DSEL realizes a strongly typed and type-directed approach to data gathering and analysis. The implementation of our DSEL is based on GADTs to allow a flexible, yet strongly typed representation of surveys. Moreover, the implementation employs the Scrap-Your-Boilerplate library to facilitate the type-dependent traversal, extraction, and combination of data gathered from surveys.
越来越多地采用民意测验和调查来收集关于各种人口和用户群体的态度和经验的信息。调查的最终目的是确定趋势和关系,以便为决策者提供信息。为此,必须对调查收集的数据进行适当的分析。目前现有的大多数工具都侧重于数据收集任务的用户界面方面,但很少关注所收集数据的结构和类型,这些数据通常表示为潜在的标记注释,但在其他方面是非结构化的纯文本。这使得编写数据分析程序的任务通常很困难且容易出错,而类型化数据表示可以支持编写面向类型的数据分析工具,从而享受静态类型的许多好处。在本文中,我们介绍了Surveyor,这是一个DSEL,它允许组合构建类型调查,其中类型描述要收集的数据的结构。可以运行调查来收集类型化数据,然后将其置于使用Surveyor的类型化组合器构建的分析工具中。总之,Surveyor DSEL实现了一种强类型和类型导向的数据收集和分析方法。我们的DSEL的实现基于gadt,以允许灵活的、强类型的调查表示。此外,该实现使用了scrapi - your - boilerplate库来促进从调查中收集的数据的依赖类型的遍历、提取和组合。
{"title":"Surveyor: a DSEL for representing and analyzing strongly typed surveys","authors":"W. Allen, Martin Erwig","doi":"10.1145/2364506.2364518","DOIUrl":"https://doi.org/10.1145/2364506.2364518","url":null,"abstract":"Polls and surveys are increasingly employed to gather information about attitudes and experiences of all kinds of populations and user groups. The ultimate purpose of a survey is to identify trends and relationships that can inform decision makers. To this end, the data gathered by a survey must be appropriately analyzed.\u0000 Most of the currently existing tools focus on the user interface aspect of the data collection task, but pay little attention to the structure and type of the collected data, which are usually represented as potentially tag-annotated, but otherwise unstructured, plain text. This makes the task of writing data analysis programs often difficult and error-prone, whereas a typed data representation could support the writing of type-directed data analysis tools that would enjoy the many benefits of static typing.\u0000 In this paper we present Surveyor, a DSEL that allows the compositional construction of typed surveys, where the types describe the structure of the data to be collected. A survey can be run to gather typed data, which can then be subjected to analysis tools that are built using Surveyor's typed combinators. Altogether the Surveyor DSEL realizes a strongly typed and type-directed approach to data gathering and analysis.\u0000 The implementation of our DSEL is based on GADTs to allow a flexible, yet strongly typed representation of surveys. Moreover, the implementation employs the Scrap-Your-Boilerplate library to facilitate the type-dependent traversal, extraction, and combination of data gathered from surveys.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"51 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2013-01-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"124220406","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
xmonad in Coq (experience report): programming a window manager in a proof assistant xmonad in Coq(经验报告):在一个proof assistant中编写一个窗口管理器
Pub Date : 2013-01-17 DOI: 10.1145/2364506.2364523
Wouter Swierstra
This report documents the insights gained from implementing the core functionality of xmonad, a popular window manager written in Haskell, in the Coq proof assistant. Rather than focus on verification, this report outlines the technical challenges involved with incorporating Coq code in a Haskell project.
本报告记录了在Coq验证助手中实现xmonad核心功能所获得的见解,xmonad是一个用Haskell编写的流行窗口管理器。本报告并没有关注验证,而是概述了在Haskell项目中合并Coq代码所涉及的技术挑战。
{"title":"xmonad in Coq (experience report): programming a window manager in a proof assistant","authors":"Wouter Swierstra","doi":"10.1145/2364506.2364523","DOIUrl":"https://doi.org/10.1145/2364506.2364523","url":null,"abstract":"This report documents the insights gained from implementing the core functionality of xmonad, a popular window manager written in Haskell, in the Coq proof assistant. Rather than focus on verification, this report outlines the technical challenges involved with incorporating Coq code in a Haskell project.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"21 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2013-01-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116182855","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
Guiding parallel array fusion with indexed types 引导并行数组融合与索引类型
Pub Date : 2013-01-17 DOI: 10.1145/2364506.2364511
B. Lippmeier, M. Chakravarty, G. Keller, S. Jones
We present a refined approach to parallel array fusion that uses indexed types to specify the internal representation of each array. Our approach aids the client programmer in reasoning about the performance of their program in terms of the source code. It also makes the intermediate code easier to transform at compile-time, resulting in faster compilation and more reliable runtimes. We demonstrate how our new approach improves both the clarity and performance of several end-user written programs, including a fluid flow solver and an interpolator for volumetric data.
我们提出了一种改进的并行数组融合方法,该方法使用索引类型来指定每个数组的内部表示。我们的方法帮助客户程序员根据源代码来推断他们的程序的性能。它还使中间代码更容易在编译时转换,从而实现更快的编译和更可靠的运行时。我们演示了我们的新方法如何提高几个最终用户编写的程序的清晰度和性能,包括流体流动求解器和体积数据插值器。
{"title":"Guiding parallel array fusion with indexed types","authors":"B. Lippmeier, M. Chakravarty, G. Keller, S. Jones","doi":"10.1145/2364506.2364511","DOIUrl":"https://doi.org/10.1145/2364506.2364511","url":null,"abstract":"We present a refined approach to parallel array fusion that uses indexed types to specify the internal representation of each array. Our approach aids the client programmer in reasoning about the performance of their program in terms of the source code. It also makes the intermediate code easier to transform at compile-time, resulting in faster compilation and more reliable runtimes. We demonstrate how our new approach improves both the clarity and performance of several end-user written programs, including a fluid flow solver and an interpolator for volumetric data.","PeriodicalId":188691,"journal":{"name":"ACM SIGPLAN Symposium/Workshop on Haskell","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2013-01-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129851699","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}
引用次数: 36
期刊
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