arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.07958cs.PLcs.DC
收藏

消息排序的 Actor 能力(扩展版)

Actor Capabilities for Message Ordering (Extended Version)

Colin S. Gordon

AI总结:

本文提出actor capabilities(Actor能力),通过为Actor引用配备协议限制消息发送的类型与顺序,并在基础类型系统上分层构建效应系统,确保Actor行为能处理任何到达的消息,为更强推理奠定基础。

摘要:

Actor 系统是一种灵活的并发与分布式编程模型,不仅可高效实现,还能在构造上避免许多经典的并发错误。然而,Actor 系统仍须应对消息以意外顺序到达的挑战。\n我们描述了一种限制 Actor 之间相互发送消息顺序的方法,通过为 Actor 引用——用于寻址另一个 Actor 的句柄——配备一个协议,限制可以使用该特定 Actor 引用发送哪些消息类型以及以何种顺序发送。这赋予了 Actor 引用静态(流敏感)能力的属性,我们将其称为 actor capabilities(Actor 能力)。\n通过仅向其他 Actor 发送受限的 Actor 引用,它们可以控制其他 Actor 以何种顺序发送哪些消息。复制(拆分)Actor 引用的规则确保这些限制在存在委托的情况下依然适用。这些能力本身限制了消息排序,这可能构成更强形式推理的基础。我们通过在基础类型系统之上分层构建一个效应系统来证明这一点,其中在 Actor 能力与 Actor 行为的效应之间强制执行的关系,确保了 Actor 的行为始终准备好处理可能到达的任何消息。

英文摘要:

Actor systems are a flexible model of concurrent and distributed programming, which are efficiently implementable, and avoid many classic concurrency bugs by construction. However actor systems must still deal with the challenge of messages arriving in unexpected orderings. We describe an approach to restricting the orders in which actors send messages to each other, by equipping actor references -- the handle used to address another actor -- with a protocol restricting which message types can be sent to another actor and in which order using that particular actor reference. This endows the actor references with the properties of static (flow-sensitive) capabilities, which we call actor capabilities. By sending other actors only restricted actor references, they may control which messages are sent in which orders by other actors. Rules for duplicating (splitting) actor references ensure that these restrictions apply even in the presence of delegation. The capabilities themselves restrict message ordering, which may form the foundation for stronger forms of reasoning. We demonstrate this by layering an effect system over the base type system, where the relationships enforced between the actor capabilities and the effects of an actor's behaviour ensure that an actor's behaviour is always prepared to handle any message that may arrive.

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

↑