Session-Based Compositional Analysis for Actor-Based Languages Using Futures [chapter]

Eduard Kamburjan, Crystal Chang Din, Tzu-Chun Chen
2016 Lecture Notes in Computer Science  
This paper proposes a simple yet concise framework to statically verify communication correctness in a concurrency model using futures. We consider the concurrency model of the core ABS language, which supports actor-style asynchronous communication using futures and cooperative scheduling. We provide a type discipline based on session types, which gives a high-level abstraction for structured interactions. By using it we statically verify if the local implementations comply with the
more » ... on correctness. We extend core ABS with sessions and annotations to express scheduling policies based on required communication ordering. The annotation is statically checked against the session automata derived from the session types. Introduction While distributed and concurrent systems are the pillars of modern IT infrastructures, it is non-trivial to model asynchronous interactions and statically guarantee communication correctness of such systems. This challenge motivates us to bring a compositional analysis framework, which models and locally verifies the behaviors of each distributed endpoints (i.e. components) from the specification of their global interactions. For modeling, we focus on core ABS [10, 15] , an object-oriented actor-based language designed to model distributed and concurrent systems with asynchronous communications. For verification, we establish a hybrid analysis, which statically type checks local objects' behaviors and, at the same time ensures that local schedulers obey to specified policies during runtime. We apply session types [12, 21] to type interactions by abstracting structured communications as a global specification, and then automatically generating local specifications from the global one to locally type check endpoint behaviors. The distinguishing features of the core ABS concurrency model are (1) cooperative scheduling, where methods explicitly control internal interleavings by explicit scheduling points, and (2) the usage of futures [11], which decouple the process invoking a method and the process reading the returned value. By sharing future identities, the caller enables other objects to wait for the same method Every author contributed to this paper equally. core ABS to ensure that the endpoints and their local schedulers behave well to the specified communication order. The Session-based ABS Language (SABS) This section introduces the concept of session to core ABS [10, 15] . The extended language is called session-based ABS, SABS in short. The goal of this extension is to equip the language's compiler with the ability to statically ensure communication correctness for applications written in core ABS. 3.1 Syntax and the concurrency model of core ABS
doi:10.1007/978-3-319-47846-3_19 fatcat:yeeer53imzebxa2qn3thlzo3oa