论文标题
伴随反应性GUI
Adjoint Reactive GUI
论文作者
论文摘要
与计算机的大多数交互是通过图形用户界面完成的。传统上,这些是使用共享的可变状态和回调以命令式的方式实施的。这是有效的,但也很难推理和容易出错。功能性反应性编程(FRP)提供了一种优雅的替代方案,该替代方案允许GUI以声明性的方式设计。但是,大多数FRP语言都是同步的,并且不断检查新数据。这意味着在每个程序周期中,FRP风格的GUI将“唤醒”。这对于诸如文本编辑器和浏览器之类的应用程序是有问题的,在这种应用程序中通常不会在很长的时间内没有发生任何事情,我们希望实现在新数据到达之前睡觉。在本文中,我们提出了一种用于设计GUIS的异步FRP语言,称为$λ_{\ Mathsf {widget}} $。我们的语言为小部件提供了一种新颖的语义,即Guis的基础,它既提供自然的咖喱 - 逻辑解释和有效的实施策略。
Most interaction with a computer is done via a graphical user interface. Traditionally, these are implemented in an imperative fashion using shared mutable state and callbacks. This is efficient, but is also difficult to reason about and error prone. Functional Reactive Programming (FRP) provides an elegant alternative which allows GUIs to be designed in a declarative fashion. However, most FRP languages are synchronous and continually check for new data. This means that an FRP-style GUI will "wake up" on each program cycle. This is problematic for applications like text editors and browsers, where often nothing happens for extended periods of time, and we want the implementation to sleep until new data arrives. In this paper, we present an asynchronous FRP language for designing GUIs called $λ_{\mathsf{Widget}}$. Our language provides a novel semantics for widgets, the building block of GUIs, which offers both a natural Curry--Howard logical interpretation and an efficient implementation strategy.