Stateful Behavioral Types for ABS

It is notoriously hard to correctly implement a multiparty protocol which involves asynchronous/concurrent interactions and the constraints on states of multiple participants. To assist developers in implementing such protocols, we propose a novel specification language to specify interactions within multiple object-oriented actors and the side-effects on heap memory of those actors; a behavioral-type-based analysis is presented for type checking. Our specification language formalizes a protocol as a global type, which describes the procedure of asynchronous method calls, the usage of futures, and the heap side-effects with a first-order logic. To characterize runs of instances of types, we give a model-theoretic semantics for types and translate them into logical constraints over traces. We prove protocol adherence: If a program is well-typed w.r.t. a protocol, then every trace of the program adheres to the protocol, i.e., every trace is a model for the formula of its type.

[1]  Sophia Drossopoulou,et al.  Objects and session types , 2009, Inf. Comput..

[2]  Carl Hewitt,et al.  A Universal Modular ACTOR Formalism for Artificial Intelligence , 1973, IJCAI.

[3]  Elvira Albert,et al.  May-Happen-in-Parallel Analysis for Actor-Based Concurrency , 2015, ACM Trans. Comput. Log..

[4]  Cosimo Laneve,et al.  A framework for deadlock detection in core ABS , 2015, Software & Systems Modeling.

[5]  Laura Bocchi,et al.  A Multiparty Multi-session Logic , 2012, TGC.

[6]  Cosimo Laneve,et al.  The Pairing of Contracts and Session Types , 2008, Concurrency, Graphs and Models.

[7]  David Harel,et al.  First-Order Dynamic Logic , 1979, Lecture Notes in Computer Science.

[8]  Nobuko Yoshida,et al.  Multiparty asynchronous session types , 2008, POPL '08.

[9]  Cosimo Laneve,et al.  Analysis of Synchronisations in Stateful Active Objects , 2017, IFM.

[10]  Philip Wadler,et al.  Theory and Applications of Behavioural Types (Dagstuhl Seminar 17051) , 2017, Dagstuhl Reports.

[11]  Reiner Hähnle,et al.  KeY-ABS: A Deductive Verification Tool for the Concurrent Modelling Language ABS , 2015, CADE.

[12]  Cosimo Laneve,et al.  Actors may synchronize, safely! , 2016, PPDP.

[13]  Nobuko Yoshida,et al.  Characteristic Formulae for Session Types , 2016, TACAS.

[14]  Crystal Chang Din,et al.  Session-Based Compositional Analysis for Actor-Based Languages Using Futures , 2016, ICFEM.

[15]  Luca Padovani Deadlock-Free Typestate-Oriented Programming , 2018, Art Sci. Eng. Program..

[16]  Luca Padovani,et al.  A theory of contracts for Web services , 2007, TOPL.

[17]  Frank S. de Boer,et al.  A Survey of Active Object Languages , 2017, ACM Comput. Surv..

[18]  Lauretta O. Osho,et al.  Axiomatic Basis for Computer Programming , 2013 .

[19]  Laura Bocchi,et al.  Three Algorithms and a Methodology for Amending Contracts for Choreographies , 2012, Sci. Ann. Comput. Sci..

[20]  Bernardo Toninho,et al.  Certifying data in multiparty session types , 2017, J. Log. Algebraic Methods Program..

[21]  Dirk Riehle,et al.  Pattern Languages of Program Design 3 , 1997 .

[22]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[23]  Elvira Albert,et al.  May-Happen-in-Parallel Based Deadlock Analysis for Concurrent Objects , 2013, FMOODS/FORTE.

[24]  Frank Pfenning,et al.  Session Types as Intuitionistic Linear Propositions , 2010, CONCUR.

[25]  Reiner Hähnle,et al.  ABS: A Core Language for Abstract Behavioral Specification , 2010, FMCO.

[26]  Philip Wadler,et al.  Coherence Generalises Duality: A Logical Explanation of Multiparty Session Types , 2016, CONCUR.

[27]  Luca Padovani,et al.  The chemical approach to typestate-oriented programming , 2015, OOPSLA.

[28]  Davide Ancona,et al.  Behavioral Types in Programming Languages , 2016, Found. Trends Program. Lang..

[29]  Olaf Owe,et al.  A sound and complete reasoning system for asynchronous communication with shared futures , 2014, J. Log. Algebraic Methods Program..

[30]  Mary Jean Harrold,et al.  Heap cloning: Enabling dynamic symbolic execution of java programs , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[31]  L. Henkin Relativization with respect to formulas and its use in proofs of independence , 1968 .

[32]  António Ravara,et al.  Modular Session Types for Objects , 2015, Log. Methods Comput. Sci..

[33]  Reiner Hähnle,et al.  History-Based Specification and Verification of Scalable Concurrent and Distributed Systems , 2015, ICFEM.

[34]  Peter H. Schmitt,et al.  Dynamic Frames in Java Dynamic Logic , 2010, FoVeOOS.

[35]  Eduard Kamburjan Session Types for ABS , 2016 .

[36]  Ralph E. Johnson,et al.  Why Do Scala Developers Mix the Actor Model with other Concurrency Models? , 2013, ECOOP.

[37]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

[38]  Carl Hewitt,et al.  The incremental garbage collection of processes , 1977, Artificial Intelligence and Programming Languages.

[39]  Laura Bocchi,et al.  A Theory of Design-by-Contract for Distributed Multiparty Interactions , 2010, CONCUR.