42 research outputs found
Typing actors using behavioural types
The actor model of computation assists and disciplines
the development of concurrent programs by forcing
the software engineer to reason about high-level concurrency
abstractions. While this leads to a better handling
of concurrency-related issues, the model itself does not exclude
erratic program behaviours. In this paper we consider
the actor model and investigate a type-based static analysis
to identify actor systems which may behave erraticly during
runtime. We consider the notion of behavioural types
and consider issues related to the nature of the actor model
including non-determinism, multi-party communication, dynamic
actor spawning, non-finite computation and a possibly
changing communication topology, which we contrast with
existing works.peer-reviewe
Behavioural types for non-uniform memory accesses
Concurrent programs executing on NUMA architectures consist of concurrent
entities (e.g. threads, actors) and data placed on different nodes. Execution
of these concurrent entities often reads or updates states from remote nodes.
The performance of such systems depends on the extent to which the concurrent
entities can be executing in parallel, and on the amount of the remote reads
and writes.
We consider an actor-based object oriented language, and propose a type
system which expresses the topology of the program (the placement of the actors
and data on the nodes), and an effect system which characterises remote reads
and writes (in terms of which node reads/writes from which other nodes). We use
a variant of ownership types for the topology, and a combination of behavioural
and ownership types for the effect system.Comment: In Proceedings PLACES 2015, arXiv:1602.0325
Multiparty Session Actors
Actor coordination armoured with a suitable protocol description language has
been a pressing problem in the actors community. We study the applicability of
multiparty session type (MPST) protocols for verification of actor programs. We
incorporate sessions to actors by introducing minimum additions to the model
such as the notion of actor roles and protocol mailbox. The framework uses
Scribble, which is a protocol description language based on multiparty session
types. Our programming model supports actor-like syntax and runtime
verification mechanism guaranteeing type-safety and progress of the
communicating entities. An actor can implement multiple roles in a similar way
as an object can implement multiple interfaces. Multiple roles allow for
inter-concurrency in a single actor still preserving its progress property. We
demonstrate our framework by designing and implementing a session actor library
in Python and its runtime verification mechanism.Comment: In Proceedings PLACES 2014, arXiv:1406.331
A semantic deconstruction of session types
We investigate the semantic foundations of session types, by revisiting them in the abstract setting of labelled transition systems. The crucial insight is a simulation relation which generalises the usual syntax-directed notions of typing and subtyping, and encompasses both synchronous and asynchronous binary session types. This allows us to extend the session types theory to some common programming patterns which are not typically considered in the session types literature
Behavioural Types for Actor Systems
Recent mainstream programming languages such as Erlang or Scala have renewed
the interest on the Actor model of concurrency. However, the literature on the
static analysis of actor systems is still lacking of mature formal methods. In
this paper we present a minimal actor calculus that takes as primitive the
basic constructs of Scala's Actors API. More precisely, actors can send
asynchronous messages, process received messages according to a pattern
matching mechanism, and dynamically create new actors, whose scope can be
extruded by passing actor names as message parameters. Drawing inspiration from
the linear types and session type theories developed for process calculi, we
put forward a behavioural type system that addresses the key issues of an actor
calculus. We then study a safety property dealing with the determinism of
finite actor com- munication. More precisely, we show that well typed and
balanced actor systems are (i) deadlock-free and (ii) any message will
eventually be handled by the target actor, and dually no actor will
indefinitely wait for an expected messag
Set-theoretic Types for Erlang
Erlang is a functional programming language with dynamic typing. The language
offers great flexibility for destructing values through pattern matching and
dynamic type tests. Erlang also comes with a type language supporting
parametric polymorphism, equi-recursive types, as well as union and a limited
form of intersection types. However, type signatures only serve as
documentation, there is no check that a function body conforms to its
signature. Set-theoretic types and semantic subtyping fit Erlang's feature set
very well. They allow expressing nearly all constructs of its type language and
provide means for statically checking type signatures. This article brings
set-theoretic types to Erlang and demonstrates how existing Erlang code can be
statically typechecked without or with only minor modifications to the code.
Further, the article formalizes the main ingredients of the type system in a
small core calculus, reports on an implementation of the system, and compares
it with other static typecheckers for Erlang.Comment: 14 pages, 9 figures, IFL 2022; latexmk -pdf to buil