arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.07738cs.PL
收藏

当程序不得不看着油漆变干时

When Programs Have to Watch Paint Dry

Danel Ahman

AI总结:

本文提出时间分级的 Fitch 风格模态类型系统与带时间感知代数效果的核心演算,以模块化保证程序按资源所需的时间约束安全执行。

摘要:

我们探索用于安全使用资源的类型系统和编程抽象。具体而言,我们研究如何使用类型来模块化地指定并检查程序何时被允许使用其资源;例如,在对生产线上的机械臂进行编程时,确保喷漆部件在装配前获得足够的干燥时间至关重要。我们使用 Fitch 风格模态类型系统的一种时间分级变体来刻画此类时间资源,开发了相应的模态类型化、有副作用核心演算,并为其配备了由具体预层模型说明的分级单子指称语义。我们的演算还包括时间感知的分级代数效果和效果处理器。前者得到了一种新颖的时间处理:操作的规范包含其执行时间,并且其续延知道在开始执行前已经过去了一个操作所值的额外时间,从而能够在其中安全访问进一步的时间资源;同时,效果处理器必须遵守这一时间纪律。

英文摘要:

We explore type systems and programming abstractions for the safe use of resources. In particular, we investigate how to use types to modularly specify and check when programs are allowed to use their resources, e.g., when programming a robot arm on a production line, it is crucial that painted parts are given enough time to dry before assembly. We capture such temporal resources using a time-graded variant of Fitch-style modal type systems, develop a corresponding modally typed, effectful core calculus, and equip it with a graded-monadic denotational semantics illustrated by a concrete presheaf model. Our calculus also includes temporally-aware graded algebraic effects and effect handlers. The former are given a novel temporal treatment, where operations' specifications include their execution times, and their continuations know that an operation's worth of additional time has passed before they start executing, making it possible to safely access further temporal resources in them, and where effect handlers have to respect this temporal discipline.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑