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

具有资源感知会话类型的工作分析

Work Analysis with Resource-Aware Session Types

Ankush Das, Jan Hoffmann, Frank Pfenning

摘要:

虽然存在几种成功的技术来支持程序员推导顺序代码的静态资源界限,但分析消息传递并发进程的资源使用情况带来了额外的挑战。为了应对这些挑战,本文提出了一个静态的消息传递过程所执行的总工作的最坏情况的界限的分析。为了将交互过程分解为可以隔离分析的组件,分析基于新颖的资源感知会话类型,其描述了用于进程间通信的协议和资源契约。一个关键的创新是,消息和流程都有可能在通信时分担和摊销成本。为了在没有静态数据结构和固有大小的情况下象征性地表达资源使用,资源契约描述了作为进程之间交互的函数的边界。资源感知会话类型在线性类型系统中结合了标准二进制会话类型和基于类型的摊销资源分析。这种类型的系统制定的核心会话类型演算的语言SILL和证明声音相对于一个基于多集的运营成本语义,跟踪在系统中交换的消息的总数。分析的有效性证明了标准的例子,从摊还分析和文献的会话类型,并通过比较性能分析不同的并发程序实现相同的接口。

英文摘要:

While there exist several successful techniques for supporting programmers in deriving static resource bounds for sequential code, analyzing the resource usage of message-passing concurrent processes poses additional challenges. To meet these challenges, this article presents an analysis for statically deriving worst-case bounds on the total work performed by message-passing processes. To decompose interacting processes into components that can be analyzed in isolation, the analysis is based on novel resource-aware session types, which describe protocols and resource contracts for inter-process communication. A key innovation is that both messages and processes carry potential to share and amortize cost while communicating. To symbolically express resource usage in a setting without static data structures and intrinsic sizes, resource contracts describe bounds that are functions of interactions between processes. Resource-aware session types combine standard binary session types and type-based amortized resource analysis in a linear type system. This type system is formulated for a core session-type calculus of the language SILL and proved sound with respect to a multiset-based operational cost semantics that tracks the total number of messages that are exchanged in a system. The effectiveness of the analysis is demonstrated by analyzing standard examples from amortized analysis and the literature on session types and by a comparative performance analysis of different concurrent programs implementing the same interface.

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

↑