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 likeI/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.
翻译:随着Things(IoT)互联网的日益普及,正在对资源限制的 IoT 设备制定更复杂的逻辑,几乎完全使用 C 编程语言。C 提供对记忆的低水平控制,但它缺乏一些高级编程抽象的高级编程,例如高阶功能、多形态、强静态打字、记忆安全和自动记忆管理。我们介绍了海暴,这是一种静态型、纯功能性的程序编制语言,试图解决上述问题。这是一种高层次的编程语言,有严格的打字纪律。它支持高调功能、尾部和自动记忆管理等功能,以宣示方式用于编程 IoT 设备。这些装置的应用程序往往被I/O 大量控制,但缺少一些高级编程功能,例如高调功能功能功能功能功能功能、多功能性语言、记忆安全性和记忆性记忆性管理等。我们通过资源类型来探索一种纯粹功能性独立语言的设计,在这个领域更常见地将功能性核心嵌入一个紧要紧的外壳。语言借用了箭型FRP的组合、尾和自动记忆管理,但有离式的轨式存储和自动记忆管理。在这些装置上运行的应用程序的应用程序的应用程序中往往被I/Ord-rde-rde-cha 的系统中,我们用其他的图像的图像的系统设计了一个远的图像式的图式的图式的图。