18 research outputs found

    Multiparty Session Types Meet Communicating Automata

    No full text
    Abstract. Communicating finite state machines (CFSMs) represent processes which communicate by asynchronous exchanges of messages via FIFO channels. Their major impact has been in characterising essential properties of communications such as freedom from deadlock and communication error, and buffer boundedness. CFSMs are known to be computationally hard: most of these properties are undecidable even in restricted cases. At the same time, multiparty session types are a recent typed framework whose main feature is its ability to efficiently enforce these properties for mobile processes and programming languages. This paper ties the links between the two frameworks to achieve a two-fold goal. On one hand, we present a generalised variant of multiparty session types that have a direct semantical correspondence to CFSMs. Our calculus can treat expressive forking, merging and joining protocols that are absent from existing session frameworks, and our typing system can ensure properties such as safety, boundedness and liveness on distributed processes by a polynomial time type checking. On the other hand, multiparty session types allow us to identify a new class of CF-SMs that automatically enjoy the aforementioned properties, generalising Gouda et al’s work [13] (for two machines) to an arbitrary number of machines.

    Safe Parallel Programming with Session Java

    Get PDF
    Abstract. The session-typed programming language Session Java (SJ) has proved to be an effective tool for distributed programming, promoting productivity and compile-time safety. This paper investigates the use of SJ for session-typed parallel programming, and introduces new language primitives for chained iteration and multi-channel communication. These primitives allow the efficient coordination of parallel computation across multiple processes, thus enabling SJ to express the complex communication topologies often used by parallel algorithms with static safety guarantees. We demonstrate that the new primitives yield clearer and safer code for pipeline, ring and mesh topologies, and through implementations of a parallel Jacobi method and an n-Body simulation. We then present a semantics and session typing system including the new primitives, and prove type soundness and deadlockfreedom for our parallel algorithm implementations. Finally, we benchmark several implementations of the n-Body simulation on a hybrid computing cluster, demonstrating the performance gains due to the new primitives. The SJ implementation is also substantially faster than an MPJ Express 1 implementation used as reference.
    corecore