Hailstorm: A Statically-Typed, Purely Functional Language for IoT Applications

Abhiroop Sarkar, M. Sheeran
{"title":"Hailstorm: A Statically-Typed, Purely Functional Language for IoT Applications","authors":"Abhiroop Sarkar, M. Sheeran","doi":"10.1145/3414080.3414092","DOIUrl":null,"url":null,"abstract":"With the growing ubiquity of Internet of Things (IoT), more complex logic is being programmed on resource-constrained IoT devices, almost exclusively using the C programming language. While C provides low-level control over memory, it lacks a number of high-level programming abstractions such as higher-order functions, polymorphism, strong static typing, memory safety, and automatic memory management. We present Hailstorm, a statically-typed, purely functional programming language that attempts to address the above problem. It is a high-level programming language with a strict typing discipline. It supports features like higher-order functions, tail-recursion, and automatic memory management, to program IoT devices in a declarative manner. Applications running on these devices tend to be heavily dominated by I/O. Hailstorm tracks side effects like I/O in its type system using resource types. This choice allowed us to explore the design of a purely functional standalone language, in an area where it is more common to embed a functional core in an imperative shell. The language borrows the combinators of arrowized FRP, but has discrete-time semantics. The design of the full set of combinators is work in progress, driven by examples. So far, we have evaluated Hailstorm by writing standard examples from the literature (earthquake detection, a railway crossing system and various other clocked systems), and also running examples on the GRiSP embedded systems board, through generation of Erlang.","PeriodicalId":328721,"journal":{"name":"Proceedings of the 22nd International Symposium on Principles and Practice of Declarative Programming","volume":"35 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-09-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 22nd International Symposium on Principles and Practice of Declarative Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3414080.3414092","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

Abstract

With the growing ubiquity of Internet of Things (IoT), more complex logic is being programmed on resource-constrained IoT devices, almost exclusively using the C programming language. While C provides low-level control over memory, it lacks a number of high-level programming abstractions such as higher-order functions, polymorphism, strong static typing, memory safety, and automatic memory management. We present Hailstorm, a statically-typed, purely functional programming language that attempts to address the above problem. It is a high-level programming language with a strict typing discipline. It supports features like higher-order functions, tail-recursion, and automatic memory management, to program IoT devices in a declarative manner. Applications running on these devices tend to be heavily dominated by I/O. Hailstorm tracks side effects like I/O in its type system using resource types. This choice allowed us to explore the design of a purely functional standalone language, in an area where it is more common to embed a functional core in an imperative shell. The language borrows the combinators of arrowized FRP, but has discrete-time semantics. The design of the full set of combinators is work in progress, driven by examples. So far, we have evaluated Hailstorm by writing standard examples from the literature (earthquake detection, a railway crossing system and various other clocked systems), and also running examples on the GRiSP embedded systems board, through generation of Erlang.
冰雹:一种用于物联网应用的静态类型、纯函数式语言
随着物联网(IoT)的日益普及,越来越复杂的逻辑正在资源受限的物联网设备上编程,几乎完全使用C编程语言。虽然C提供了对内存的低级控制,但它缺乏许多高级编程抽象,如高阶函数、多态、强静态类型、内存安全性和自动内存管理。我们介绍Hailstorm,这是一种静态类型的纯函数式编程语言,它试图解决上述问题。它是一种具有严格类型规则的高级编程语言。它支持高阶函数、尾递归和自动内存管理等功能,以声明式方式对物联网设备进行编程。在这些设备上运行的应用程序往往主要由I/O控制。Hailstorm在其类型系统中使用资源类型跟踪诸如I/O之类的副作用。这种选择使我们能够探索纯函数式独立语言的设计,因为在这个领域,将功能核心嵌入命令式shell更为常见。该语言借用了带箭头的FRP的组合,但具有离散时间语义。在实例的推动下,整套组合器的设计工作正在进行中。到目前为止,我们已经通过从文献中编写标准示例(地震检测,铁路交叉系统和各种其他时钟系统)来评估Hailstorm,并通过生成Erlang在GRiSP嵌入式系统板上运行示例。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信