首页 > 最新文献

Proceedings of the 16th ACM SIGPLAN International Haskell Symposium最新文献

英文 中文
The Essence of Reactivity 反应性的本质
Pub Date : 2023-08-30 DOI: 10.1145/3609026.3609727
Ivan Perez, F. Dedden
Reactive programming, functional reactive programming, event-based programming, stream programming, and temporal logic all share an underlying commonality: values can vary over time. These languages differ in multiple ways, including the nature of time itself (e.g., continuous or discrete, dense or sparse, implicit or explicit), on how much of the past and future can be referenced, on the kinds of values that can be represented, as well as the mechanisms used to evaluate expressions or formulas. This paper presents a series of abstractions that capture the essence of different forms of time variance. By separating the aspects that differentiate each family of formalisms, we can better express the commonalities and differences between them. We demonstrate our work with a prototype in Haskell that allows us to write programs in terms of a generic interface that can be later instantiated to different abstractions depending on the desired target.
响应式编程、函数式响应式编程、基于事件的编程、流编程和时态逻辑都有一个潜在的共性:值可以随时间变化。这些语言在很多方面有所不同,包括时间本身的性质(例如,连续的或离散的,密集的或稀疏的,隐式的或显式的),过去和未来的多少可以被引用,可以表示的值的种类,以及用于计算表达式或公式的机制。本文提出了一系列抽象概念,这些抽象概念捕捉了不同形式的时间方差的本质。通过对每个形式主义家族的区分,我们可以更好地表达它们之间的共性和差异。我们用Haskell中的一个原型来演示我们的工作,它允许我们根据一个泛型接口来编写程序,这个泛型接口以后可以根据期望的目标实例化为不同的抽象。
{"title":"The Essence of Reactivity","authors":"Ivan Perez, F. Dedden","doi":"10.1145/3609026.3609727","DOIUrl":"https://doi.org/10.1145/3609026.3609727","url":null,"abstract":"Reactive programming, functional reactive programming, event-based programming, stream programming, and temporal logic all share an underlying commonality: values can vary over time. These languages differ in multiple ways, including the nature of time itself (e.g., continuous or discrete, dense or sparse, implicit or explicit), on how much of the past and future can be referenced, on the kinds of values that can be represented, as well as the mechanisms used to evaluate expressions or formulas. This paper presents a series of abstractions that capture the essence of different forms of time variance. By separating the aspects that differentiate each family of formalisms, we can better express the commonalities and differences between them. We demonstrate our work with a prototype in Haskell that allows us to write programs in terms of a generic interface that can be later instantiated to different abstractions depending on the desired target.","PeriodicalId":184785,"journal":{"name":"Proceedings of the 16th ACM SIGPLAN International Haskell Symposium","volume":"16 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125528277","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}
引用次数: 0
falsify: Internal Shrinking Reimagined for Haskell 伪造:内部萎缩为哈斯克尔重新想象
Pub Date : 2023-08-30 DOI: 10.1145/3609026.3609733
Edsko de Vries
In unit testing we apply the function under test to known inputs and check for known outputs. By contrast, in property based testing we state properties relating inputs and outputs, apply the function to random inputs, and verify that the property holds; if not, we found a bug. Randomly generated inputs tend to be large and should therefore be minimised. Traditionally this is done with an explicitly provided shrinker, but in this paper we propose a way to write generators that obsoletes the need to write a separate shrinker. Inspired by the Python library Hypothesis, the approach can work even across monadic bind. Compared to Hypothesis, our approach is more suitable to the Haskell setting: it depends on a minimal set of core principles, and handles generation and shrinking of infinite data structures, including functions.
在单元测试中,我们将待测函数应用于已知的输入,并检查已知的输出。相比之下,在基于属性的测试中,我们声明与输入和输出相关的属性,将函数应用于随机输入,并验证属性是否成立;如果没有,我们发现了一个bug。随机生成的输入往往很大,因此应该最小化。传统上,这是通过显式提供的收缩器来完成的,但在本文中,我们提出了一种编写生成器的方法,从而不再需要编写单独的收缩器。受Python库假说的启发,该方法甚至可以跨一元绑定工作。与Hypothesis相比,我们的方法更适合Haskell设置:它依赖于一组最小的核心原则,并处理无限数据结构的生成和收缩,包括函数。
{"title":"falsify: Internal Shrinking Reimagined for Haskell","authors":"Edsko de Vries","doi":"10.1145/3609026.3609733","DOIUrl":"https://doi.org/10.1145/3609026.3609733","url":null,"abstract":"In unit testing we apply the function under test to known inputs and check for known outputs. By contrast, in property based testing we state properties relating inputs and outputs, apply the function to random inputs, and verify that the property holds; if not, we found a bug. Randomly generated inputs tend to be large and should therefore be minimised. Traditionally this is done with an explicitly provided shrinker, but in this paper we propose a way to write generators that obsoletes the need to write a separate shrinker. Inspired by the Python library Hypothesis, the approach can work even across monadic bind. Compared to Hypothesis, our approach is more suitable to the Haskell setting: it depends on a minimal set of core principles, and handles generation and shrinking of infinite data structures, including functions.","PeriodicalId":184785,"journal":{"name":"Proceedings of the 16th ACM SIGPLAN International Haskell Symposium","volume":"23 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125532314","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}
引用次数: 0
This Is Driving Me Loopy: Efficient Loops in Arrowized Functional Reactive Programs 这让我发疯:箭头化函数式反应程序中的高效循环
Pub Date : 2023-08-30 DOI: 10.1145/3609026.3609726
Finnbar Keating, Michael B. Gale
Arrowized Functional Reactive Programming (AFRP) is one approach to writing reactive programs declaratively, based on the arrows abstraction in Haskell. While AFRP elegantly expresses the relationships between inputs and outputs of a reactive system, na'ive implementations suffer from poor performance. In particular, the loop combinator depends on lazy semantics: this inflicts the overheads of lazy evaluation and simultaneously prevents existing optimisation techniques from being applied to it. We present a novel program transformation which utilises the Arrow and ArrowLoop laws to transform typical uses of loop into restricted forms that have an execution order that is known at compile-time and therefore can be executed strictly. We evaluate the performance gained from our transformations and prove that the transformations are correct.
箭头化函数式响应式编程(AFRP)是一种基于Haskell中的箭头抽象,以声明方式编写响应式程序的方法。虽然AFRP优雅地表达了反应性系统的输入和输出之间的关系,但幼稚的实现会受到性能差的影响。特别是,循环组合子依赖于惰性语义:这会造成惰性求值的开销,同时阻止现有的优化技术应用于它。我们提出了一种新的程序转换,它利用Arrow和ArrowLoop定律将循环的典型用法转换为具有在编译时已知的执行顺序的限制形式,因此可以严格执行。我们评估了从我们的转换获得的性能,并证明了转换是正确的。
{"title":"This Is Driving Me Loopy: Efficient Loops in Arrowized Functional Reactive Programs","authors":"Finnbar Keating, Michael B. Gale","doi":"10.1145/3609026.3609726","DOIUrl":"https://doi.org/10.1145/3609026.3609726","url":null,"abstract":"Arrowized Functional Reactive Programming (AFRP) is one approach to writing reactive programs declaratively, based on the arrows abstraction in Haskell. While AFRP elegantly expresses the relationships between inputs and outputs of a reactive system, na'ive implementations suffer from poor performance. In particular, the loop combinator depends on lazy semantics: this inflicts the overheads of lazy evaluation and simultaneously prevents existing optimisation techniques from being applied to it. We present a novel program transformation which utilises the Arrow and ArrowLoop laws to transform typical uses of loop into restricted forms that have an execution order that is known at compile-time and therefore can be executed strictly. We evaluate the performance gained from our transformations and prove that the transformations are correct.","PeriodicalId":184785,"journal":{"name":"Proceedings of the 16th ACM SIGPLAN International Haskell Symposium","volume":"15 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"124055520","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}
引用次数: 0
Haskell for Choice-Based Learning (Keynote) 基于选择学习的Haskell(主题演讲)
Pub Date : 2023-08-30 DOI: 10.1145/3609026.3615580
Ningning Xie
Machine learning has achieved many successes during the past decades, spanning domains of game-playing, protein folding, competitive programming, and many others. However, while there have been major efforts in building programming techniques and frameworks for machine learning programming, there has been very little study of general language design for machine learning programming. We pursue such a study in this talk, focusing on choice-based learning, particularly where choices are driven by optimizations. This includes widely-used decision-making models and techniques (e.g., Markov decision processes or gradient descent) which provide frameworks for describing systems in terms of choices (e.g., actions or parameters) and their resulting feedback as losses (dually, rewards). We propose and give evidence for the following thesis: languages for choice-based learning can be obtained by combining two paradigms, algebraic effects and handlers, and the selection monad. We provide a prototype implementation as a Haskell library and present a variety of programming examples for choice-based learning: stochastic gradient descent, hyperparameter tuning, generative adversarial networks, and reinforcement learning.
在过去的几十年里,机器学习取得了许多成功,跨越了游戏、蛋白质折叠、竞争性编程等许多领域。然而,尽管在为机器学习编程构建编程技术和框架方面已经做出了重大努力,但对机器学习编程的通用语言设计的研究却很少。我们将在本次演讲中进行这样的研究,重点关注基于选择的学习,特别是由优化驱动的选择。这包括广泛使用的决策模型和技术(例如,马尔可夫决策过程或梯度下降),它们提供了根据选择(例如,行动或参数)及其作为损失(双重,奖励)的反馈来描述系统的框架。我们提出并证明了以下论点:基于选择的学习语言可以通过结合代数效应和处理程序以及选择单子两种范式来获得。我们提供了一个原型实现作为Haskell库,并提供了各种基于选择的学习编程示例:随机梯度下降、超参数调优、生成对抗网络和强化学习。
{"title":"Haskell for Choice-Based Learning (Keynote)","authors":"Ningning Xie","doi":"10.1145/3609026.3615580","DOIUrl":"https://doi.org/10.1145/3609026.3615580","url":null,"abstract":"Machine learning has achieved many successes during the past decades, spanning domains of game-playing, protein folding, competitive programming, and many others. However, while there have been major efforts in building programming techniques and frameworks for machine learning programming, there has been very little study of general language design for machine learning programming. We pursue such a study in this talk, focusing on choice-based learning, particularly where choices are driven by optimizations. This includes widely-used decision-making models and techniques (e.g., Markov decision processes or gradient descent) which provide frameworks for describing systems in terms of choices (e.g., actions or parameters) and their resulting feedback as losses (dually, rewards). We propose and give evidence for the following thesis: languages for choice-based learning can be obtained by combining two paradigms, algebraic effects and handlers, and the selection monad. We provide a prototype implementation as a Haskell library and present a variety of programming examples for choice-based learning: stochastic gradient descent, hyperparameter tuning, generative adversarial networks, and reinforcement learning.","PeriodicalId":184785,"journal":{"name":"Proceedings of the 16th ACM SIGPLAN International Haskell Symposium","volume":"513 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123249362","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}
引用次数: 0
Don’t Go Down the Rabbit Hole: Reprioritizing Enumeration for Property-Based Testing 不要掉进兔子洞:为基于属性的测试重新确定枚举的优先级
Pub Date : 2023-08-30 DOI: 10.1145/3609026.3609730
Segev Elazar Mittelman, Aviel Resnick, Ivan Perez, Alwyn E. Goodloe, Leonidas Lampropoulos
In our implementation, we integrate a state-of-the-art enumeration-based property-based testing framework, LazySearch, with a state-of-the-art combinatorial testing tool, NIST’s ACTS, and demonstrate how it can significantly speed up the effectiveness of testing—up to more than 20× in the case of a prior System F case study from the literature.
在我们的实现中,我们将最先进的基于枚举的基于属性的测试框架LazySearch与最先进的组合测试工具NIST的ACTS集成在一起,并演示了它如何显著加快测试的有效性——在文献中先前的System F案例研究中,测试效率提高了20倍以上。
{"title":"Don’t Go Down the Rabbit Hole: Reprioritizing Enumeration for Property-Based Testing","authors":"Segev Elazar Mittelman, Aviel Resnick, Ivan Perez, Alwyn E. Goodloe, Leonidas Lampropoulos","doi":"10.1145/3609026.3609730","DOIUrl":"https://doi.org/10.1145/3609026.3609730","url":null,"abstract":"In our implementation, we integrate a state-of-the-art enumeration-based property-based testing framework, LazySearch, with a state-of-the-art combinatorial testing tool, NIST’s ACTS, and demonstrate how it can significantly speed up the effectiveness of testing—up to more than 20× in the case of a prior System F case study from the literature.","PeriodicalId":184785,"journal":{"name":"Proceedings of the 16th ACM SIGPLAN International Haskell Symposium","volume":"35 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"114554287","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}
引用次数: 0
Haskell Library for Safer Virtual Machine Introspection (Experience Report) Haskell库用于更安全的虚拟机自省(体验报告)
Pub Date : 2023-08-30 DOI: 10.1145/3609026.3609732
Takato Otsuka, H. Iwasaki
Virtual machine introspection (VMI) is a technique for inspecting a virtual machine from the outside, typically to analyze the operating system (guest OS) running on it. LibVMI is a C library for VMI and provides APIs for accessing guest OS's memory. However, in using LibVMI APIs directly in C, the programmer must compute target addresses in the kernel memory and then access them with their exact bit widths and types. This is an enormous burden for the programmer and is prone to introducing statically undetected but fatal errors. We create HaVMI, a Haskell library that facilitates VMI programming. HaVMI provides meta-functions for compile-time code generation by Template Haskell. These meta-functions make it easy to write safer VMI programs. HaVMI uses Haskell language features to detect the programmer's errors statically.
虚拟机自省(VMI)是一种从外部检查虚拟机的技术,通常用于分析在其上运行的操作系统(客户机操作系统)。LibVMI是一个VMI的C库,提供了访问客户操作系统内存的api。但是,在C语言中直接使用LibVMI api时,程序员必须在内核内存中计算目标地址,然后使用精确的位宽度和类型访问它们。这对程序员来说是一个巨大的负担,并且容易引入静态未检测到但致命的错误。我们创建了HaVMI,这是一个Haskell库,可以促进VMI编程。HaVMI为模板Haskell的编译时代码生成提供了元函数。这些元函数使编写更安全的VMI程序变得容易。HaVMI使用Haskell语言特性来静态地检测程序员的错误。
{"title":"Haskell Library for Safer Virtual Machine Introspection (Experience Report)","authors":"Takato Otsuka, H. Iwasaki","doi":"10.1145/3609026.3609732","DOIUrl":"https://doi.org/10.1145/3609026.3609732","url":null,"abstract":"Virtual machine introspection (VMI) is a technique for inspecting a virtual machine from the outside, typically to analyze the operating system (guest OS) running on it. LibVMI is a C library for VMI and provides APIs for accessing guest OS's memory. However, in using LibVMI APIs directly in C, the programmer must compute target addresses in the kernel memory and then access them with their exact bit widths and types. This is an enormous burden for the programmer and is prone to introducing statically undetected but fatal errors. We create HaVMI, a Haskell library that facilitates VMI programming. HaVMI provides meta-functions for compile-time code generation by Template Haskell. These meta-functions make it easy to write safer VMI programs. HaVMI uses Haskell language features to detect the programmer's errors statically.","PeriodicalId":184785,"journal":{"name":"Proceedings of the 16th ACM SIGPLAN International Haskell Symposium","volume":"54 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121271850","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}
引用次数: 0
The Evolution of Effects (Keynote) 效应的演变(主题演讲)
Pub Date : 2023-08-30 DOI: 10.1145/3609026.3615581
Nicolas Wu
Functional programming has been celebrated for its promise of pure functions, delivering referential transparency and elegant reasoning about programs. However, real-world applications are not pure, and necessitate interaction with the outside world, introducing computational effects such as IO, state, and exceptions. The journey to harmonize these seemingly contradictory paradigms has led to a fascinating evolution of effectful programming in Haskell. The introduction of monads as a practical programming tool was a pivotal discovery, enabling controlled sequencing of effectful computations and addressing the challenge of handling side effects in a pure language. However, it soon became evident that the lack of modularity in composing effects using monads posed a limitation to effectful programming. To overcome this obstacle, monad transformers emerged as a solution, providing a composable manner of building effects on top of one another. More recent advancements have led to algebraic effects as an alternative framework that is easy to extend, particularly as domain-specific languages crafted to work in specific contexts. Nevertheless, these effects are not without quirks and limitations, leading to the development of higher-order effects. These higher-order effects extend the capabilities of algebraic effects, providing greater flexibility for expressing effectful computations, while also shedding light on the connection between the monad approach and the algebraic approach to effects. This talk will survey the historical milestones that have shaped the landscape of effectful programming in Haskell, exploring the transition from monads to monad transformers and the emergence of algebraic and higher-order effects.
函数式编程以其对纯函数的承诺而闻名,它提供了关于程序的引用透明性和优雅的推理。然而,现实世界的应用程序并不纯粹,需要与外部世界进行交互,从而引入IO、状态和异常等计算效果。协调这些看似矛盾的范式的过程导致了Haskell中有效编程的迷人演变。monad作为一种实用的编程工具的引入是一个关键的发现,它使有效计算的可控排序成为可能,并解决了在纯语言中处理副作用的挑战。然而,很快就发现,在使用单子组合效果时缺乏模块化会限制有效的编程。为了克服这个障碍,monad变压器作为一种解决方案出现了,它提供了一种可组合的方式来构建彼此之上的效果。最近的进展导致代数效应作为一种易于扩展的替代框架,特别是作为特定于领域的语言精心设计用于特定上下文。然而,这些效应并非没有怪癖和局限性,导致了高阶效应的发展。这些高阶效果扩展了代数效果的功能,为表达有效的计算提供了更大的灵活性,同时也揭示了monad方法和代数方法之间的联系。本次演讲将回顾Haskell中有效编程的历史里程碑,探索从单子到单子变换的转变,以及代数和高阶效应的出现。
{"title":"The Evolution of Effects (Keynote)","authors":"Nicolas Wu","doi":"10.1145/3609026.3615581","DOIUrl":"https://doi.org/10.1145/3609026.3615581","url":null,"abstract":"Functional programming has been celebrated for its promise of pure functions, delivering referential transparency and elegant reasoning about programs. However, real-world applications are not pure, and necessitate interaction with the outside world, introducing computational effects such as IO, state, and exceptions. The journey to harmonize these seemingly contradictory paradigms has led to a fascinating evolution of effectful programming in Haskell. The introduction of monads as a practical programming tool was a pivotal discovery, enabling controlled sequencing of effectful computations and addressing the challenge of handling side effects in a pure language. However, it soon became evident that the lack of modularity in composing effects using monads posed a limitation to effectful programming. To overcome this obstacle, monad transformers emerged as a solution, providing a composable manner of building effects on top of one another. More recent advancements have led to algebraic effects as an alternative framework that is easy to extend, particularly as domain-specific languages crafted to work in specific contexts. Nevertheless, these effects are not without quirks and limitations, leading to the development of higher-order effects. These higher-order effects extend the capabilities of algebraic effects, providing greater flexibility for expressing effectful computations, while also shedding light on the connection between the monad approach and the algebraic approach to effects. This talk will survey the historical milestones that have shaped the landscape of effectful programming in Haskell, exploring the transition from monads to monad transformers and the emergence of algebraic and higher-order effects.","PeriodicalId":184785,"journal":{"name":"Proceedings of the 16th ACM SIGPLAN International Haskell Symposium","volume":"59 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123264340","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}
引用次数: 0
HasTEE: Programming Trusted Execution Environments with Haskell HasTEE:用Haskell编程可信执行环境
Pub Date : 2023-07-24 DOI: 10.1145/3609026.3609731
Abhiroop Sarkar, Robert Krook, Alejandro Russo, Koen Claessen
Trusted Execution Environments (TEEs) are hardware enforced memory isolation units, emerging as a pivotal security solution for security-critical applications. TEEs, like Intel SGX and ARM TrustZone, allow the isolation of confidential code and data within an untrusted host environment, such as the cloud and IoT. Despite strong security guarantees, TEE adoption has been hindered by an awkward programming model. This model requires manual application partitioning and the use of error-prone, memory-unsafe, and potentially information-leaking low-level C/C++ libraries. We address the above with HasTEE, a domain-specific language (DSL) embedded in Haskell for programming TEE applications. HasTEE includes a port of the GHC runtime for the Intel-SGX TEE.HasTEE uses Haskell’s type system to automatically partition an application and to enforce Information Flow Control on confidential data. The DSL, being embedded in Haskell, allows for the usage of higher-order functions, monads, and a restricted set of I/O operations to write any standard Haskell application. Contrary to previous work, HasTEE is lightweight, simple, and is provided as a simple security library; thus avoiding any GHC modifications. We show the applicability of HasTEE by implementing case studies on federated learning, an encrypted password wallet, and a differentially-private data clean room.
可信执行环境(tee)是硬件强制的内存隔离单元,是安全关键型应用程序的关键安全解决方案。tee,如Intel SGX和ARM TrustZone,允许在不受信任的主机环境(如云和物联网)中隔离机密代码和数据。尽管有强大的安全性保证,但TEE的采用一直受到笨拙的编程模型的阻碍。该模型需要手动对应用程序进行分区,并使用容易出错、内存不安全且可能泄露信息的低级C/ c++库。我们使用HasTEE来解决上述问题,这是一种嵌入在Haskell中的领域特定语言(DSL),用于编程TEE应用程序。HasTEE包括一个用于Intel-SGX TEE的GHC运行时端口。HasTEE使用Haskell的类型系统来自动划分应用程序,并对机密数据实施信息流控制。DSL嵌入到Haskell中,允许使用高阶函数、单子和一组受限的I/O操作来编写任何标准的Haskell应用程序。与以前的工作相反,HasTEE是轻量级的,简单的,并且作为一个简单的安全库提供;从而避免任何温室气体的变化。我们通过实现关于联邦学习、加密密码钱包和差异私有数据洁净室的案例研究来展示HasTEE的适用性。
{"title":"HasTEE: Programming Trusted Execution Environments with Haskell","authors":"Abhiroop Sarkar, Robert Krook, Alejandro Russo, Koen Claessen","doi":"10.1145/3609026.3609731","DOIUrl":"https://doi.org/10.1145/3609026.3609731","url":null,"abstract":"Trusted Execution Environments (TEEs) are hardware enforced memory isolation units, emerging as a pivotal security solution for security-critical applications. TEEs, like Intel SGX and ARM TrustZone, allow the isolation of confidential code and data within an untrusted host environment, such as the cloud and IoT. Despite strong security guarantees, TEE adoption has been hindered by an awkward programming model. This model requires manual application partitioning and the use of error-prone, memory-unsafe, and potentially information-leaking low-level C/C++ libraries. We address the above with HasTEE, a domain-specific language (DSL) embedded in Haskell for programming TEE applications. HasTEE includes a port of the GHC runtime for the Intel-SGX TEE.HasTEE uses Haskell’s type system to automatically partition an application and to enforce Information Flow Control on confidential data. The DSL, being embedded in Haskell, allows for the usage of higher-order functions, monads, and a restricted set of I/O operations to write any standard Haskell application. Contrary to previous work, HasTEE is lightweight, simple, and is provided as a simple security library; thus avoiding any GHC modifications. We show the applicability of HasTEE by implementing case studies on federated learning, an encrypted password wallet, and a differentially-private data clean room.","PeriodicalId":184785,"journal":{"name":"Proceedings of the 16th ACM SIGPLAN International Haskell Symposium","volume":"28 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123112936","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}
引用次数: 0
An Exceptional Actor System (Functional Pearl) 一个特殊角色系统(功能珍珠)
Pub Date : 2023-07-20 DOI: 10.1145/3609026.3609728
Patrick Redmond, L. Kuper
The Glasgow Haskell Compiler is known for its feature-laden runtime system (RTS), which includes lightweight threads, asynchronous exceptions, and a slew of other features. Their combination is powerful enough that a programmer may complete the same task in many different ways --- some more advisable than others. We present a user-accessible actor framework hidden in plain sight within the RTS and demonstrate it on a classic example from the distributed systems literature. We then extend both the framework and example to the realm of dynamic types. Finally, we raise questions about how RTS features intersect and possibly subsume one another, and suggest that GHC can guide good practice by constraining the use of some features.
格拉斯哥Haskell编译器以其功能丰富的运行时系统(RTS)而闻名,其中包括轻量级线程、异步异常和大量其他功能。它们的组合足够强大,以至于程序员可以用许多不同的方法完成相同的任务——有些方法比其他方法更可取。我们提出了一个隐藏在RTS中的用户可访问的参与者框架,并通过分布式系统文献中的一个经典示例进行了演示。然后我们将框架和示例扩展到动态类型领域。最后,我们提出了关于RTS功能如何相互交叉和融合的问题,并建议GHC可以通过限制某些功能的使用来指导良好的实践。
{"title":"An Exceptional Actor System (Functional Pearl)","authors":"Patrick Redmond, L. Kuper","doi":"10.1145/3609026.3609728","DOIUrl":"https://doi.org/10.1145/3609026.3609728","url":null,"abstract":"The Glasgow Haskell Compiler is known for its feature-laden runtime system (RTS), which includes lightweight threads, asynchronous exceptions, and a slew of other features. Their combination is powerful enough that a programmer may complete the same task in many different ways --- some more advisable than others. We present a user-accessible actor framework hidden in plain sight within the RTS and demonstrate it on a classic example from the distributed systems literature. We then extend both the framework and example to the realm of dynamic types. Finally, we raise questions about how RTS features intersect and possibly subsume one another, and suggest that GHC can guide good practice by constraining the use of some features.","PeriodicalId":184785,"journal":{"name":"Proceedings of the 16th ACM SIGPLAN International Haskell Symposium","volume":"46 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-07-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126117104","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}
引用次数: 0
Effect Handlers for Programmable Inference 可编程推理的效果处理程序
Pub Date : 2023-03-02 DOI: 10.1145/3609026.3609729
Minh Nguyen, R. Perera, M. Wang, S. Ramsay
Inference algorithms for probabilistic programming are complex imperative programs with many moving parts. Efficient inference often requires customising an algorithm to a particular probabilistic model or problem, sometimes called inference programming. Most inference frameworks are implemented in languages that lack a disciplined approach to side effects, which can result in monolithic implementations where the structure of the algorithms is obscured and inference programming is hard. Functional programming with typed effects offers a more structured and modular foundation for programmable inference, with monad transformers being the primary structuring mechanism explored to date. This paper presents an alternative approach to inference programming based on algebraic effects. Using effect signatures to specify the key operations of the algorithms, and effect handlers to modularly interpret those operations for specific variants, we develop two abstract algorithms, or inference patterns, representing two important classes of inference: Metropolis-Hastings and particle filtering. We show how our approach reveals the algorithms’ high-level structure, and makes it easy to tailor and recombine their parts into new variants. We implement the two inference patterns as a Haskell library, and discuss the pros and cons of algebraic effects vis-à-vis monad transformers as a structuring mechanism for modular imperative algorithm design.
概率规划的推理算法是复杂的命令式程序,具有许多活动部分。有效的推理通常需要针对特定的概率模型或问题定制算法,有时称为推理编程。大多数推理框架都是用缺乏规范的副作用方法的语言实现的,这可能导致单一的实现,其中算法的结构模糊不清,推理编程很困难。具有类型化效果的函数式编程为可编程推理提供了一个更加结构化和模块化的基础,monad变压器是迄今为止探索的主要结构化机制。本文提出了一种基于代数效应的推理规划方法。使用效果签名来指定算法的关键操作,并使用效果处理程序来模块化地解释特定变体的这些操作,我们开发了两个抽象算法或推理模式,代表了两类重要的推理:Metropolis-Hastings和粒子过滤。我们展示了我们的方法如何揭示算法的高层结构,并使其易于裁剪和重新组合成新的变体。我们以Haskell库的形式实现了这两种推理模式,并讨论了代数效应在-à-vis中作为模块化命令式算法设计的结构机制的优缺点。
{"title":"Effect Handlers for Programmable Inference","authors":"Minh Nguyen, R. Perera, M. Wang, S. Ramsay","doi":"10.1145/3609026.3609729","DOIUrl":"https://doi.org/10.1145/3609026.3609729","url":null,"abstract":"Inference algorithms for probabilistic programming are complex imperative programs with many moving parts. Efficient inference often requires customising an algorithm to a particular probabilistic model or problem, sometimes called inference programming. Most inference frameworks are implemented in languages that lack a disciplined approach to side effects, which can result in monolithic implementations where the structure of the algorithms is obscured and inference programming is hard. Functional programming with typed effects offers a more structured and modular foundation for programmable inference, with monad transformers being the primary structuring mechanism explored to date. This paper presents an alternative approach to inference programming based on algebraic effects. Using effect signatures to specify the key operations of the algorithms, and effect handlers to modularly interpret those operations for specific variants, we develop two abstract algorithms, or inference patterns, representing two important classes of inference: Metropolis-Hastings and particle filtering. We show how our approach reveals the algorithms’ high-level structure, and makes it easy to tailor and recombine their parts into new variants. We implement the two inference patterns as a Haskell library, and discuss the pros and cons of algebraic effects vis-à-vis monad transformers as a structuring mechanism for modular imperative algorithm design.","PeriodicalId":184785,"journal":{"name":"Proceedings of the 16th ACM SIGPLAN International Haskell Symposium","volume":"33 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2023-03-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132473630","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
期刊
Proceedings of the 16th ACM SIGPLAN International Haskell Symposium
全部 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