Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3141834.3141837acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article
Public Access

Order types: static reasoning about message races in asynchronous message passing concurrency

Published: 23 October 2017 Publication History

Abstract

Asynchronous message passing concurrency with higher level concurrency constructs including activities, asynchronous method invocations and future return values is gaining increased popularity, as an alternative to shared memory concurrency with lower level threads and locks. However, similar to data races in shared memory concurrency, message races in asynchronous message passing concurrency can make a program incorrect and cause bugs that are hard to find and fix. This paper presents order types, a novel type system for static reasoning about message races in asynchronous message passing concurrency. Order types are local, causal and polymorphic types with the following features. First, order types encode both communication and flow behaviors and their happens-before relations. Second, order types are designed for an imperative calculus with concurrent activities, asynchronous method invocations, future return values, wait-by-necessity synchronizations on futures, first-class activities and futures, recursion and dynamic creation of activities. Third, order types are polymorphic and introduce universally quantified type variables to encode unknown values of variables. Fourth, the order type of a module can be inferred modularly using only its implementation and independent of implementations of other modules in the program. Order types complement previous work on static reasoning about races in asynchronous message passing concurrency.

References

[1]
Martin Abadi, Cormac Flanagan, and Stephen N. Freund. 2006. Types for Safe Locking: Static Race Detection for Java. TOPLAS ’06 28, 2 (2006).
[2]
Rahul Agarwal and Scott D. Stoller. 2004. Type Inference for Parameterized Race-Free Java. In VMCAI ’04.
[3]
Gul Agha. 1986. Actors: a model of concurrent computation in distributed systems. MIT Press.
[4]
Gul Agha and Carl Hewitt. 1985. Concurrent Programming Using Actors: Exploiting large-Scale Parallelism. In FSTTCS ’85.
[5]
Alexander Aiken and David Gay. 1998. Barrier Inference. In POPL ’98.
[6]
M. Astley. 1999. The actor foundry: A Java-based actor programming environment. University of Illinois at Urbana-Champaign. (1999).
[7]
Mehdi Bagherzadeh. 2016. Toward a Concurrent Programming Model with Modular Reasoning. Ph.D. Dissertation. Iowa State University.
[8]
Mehdi Bagherzadeh and Hridesh Rajan. 2015. Panini: A Concurrent Programming Model for Solving Pervasive and Oblivious Interference. In MODULARITY 2015.
[9]
Chandrasekhar Boyapati and Martin Rinard. 2001. A Parameterized Type System for Race-free Java Programs. In OOPSLA ’01.
[10]
Denis Caromel. 1993. Toward a Method of Object-oriented Concurrent Programming. CACM ’93 36, 9 (1993).
[11]
Denis Caromel, Ludovic Henrio, and Bernard Paul Serpette. 2009. Asynchronous Sequential Processes. Inf. Comput. ’09 207, 4 (2009).
[12]
Sagar Chaki, Sriram K. Rajamani, and Jakob Rehof. 2002. Types As Models: Model Checking Message-passing Programs. In POPL ’02.
[13]
Silvia Crafa. 2012. Behavioural Types for Actor Systems. CoRR abs/1206.1687 (2012).
[14]
Mariangiola Dezani-Ciancaglini, Dimitris Mostrous, Nobuko Yoshida, and Sophia Drossopoulou. 2006. Session Types for Object-oriented Languages. In ECOOP’06.
[15]
Matthew B. Dwyer and Lori A. Clarke. 1994. Data Flow Analysis for Verifying Properties of Concurrent Programs. SIGSOFT Softw. Eng. Notes ’94 19, 5 (1994).
[16]
Dawson Engler and Ken Ashcraft. 2003. RacerX: Effective, Static Detection of Race Conditions and Deadlocks. In SOSP ’03.
[17]
Cormac Flanagan and Stephen N. Freund. 2000. Type-based Race Detection for Java. In PLDI ’00.
[18]
Simon Fowler, Sam Lindley, and Philip Wadler. 2017. Mixing Metaphors: Actors as Channels and Channels as Actors. In ECOOP ’17.
[19]
Elena Giachino, Cosimo Laneve, and Michael Lienhardt. 2016. A framework for deadlock detection in core ABS. SoSym ’16 15, 4 (2016).
[20]
Dan Grossman. 2003. Type-safe Multithreading in Cyclone. In TLDI ’03.
[21]
Kohei Honda, Vasco Thudichum Vasconcelos, and Makoto Kubo. 1998. Language Primitives and Type Discipline for Structured Communication-Based Programming. In ESOP ’98.
[22]
Kohei Honda, Nobuko Yoshida, and Marco Carbone. 2008. Multiparty Asynchronous Session Types. In POPL ’08.
[23]
Christopher R. Houck and Gul Agha. 1992. HAL: A High-Level Actor Language and Its Distributed Implementation. In ICPP ’92.
[24]
Raymond Hu, Nobuko Yoshida, and Kohei Honda. 2008. Session-Based Distributed Programming in Java. In ECOOP ’08.
[25]
Atsushi Igarashi and Naoki Kobayashi. 2001. A Generic Type System for the Pi-calculus. In POPL ’01.
[26]
Einar Broch Johnsen, Reiner Hähnle, Jan Schäfer, Rudolf Schlatte, and Martin Steffen. 2011. ABS: A Core Language for Abstract Behavioral Specification. In FMCO ’10.
[27]
WooYoung Kim. 1997. ThAL: An Actor System for Efficient and Scalable Concurrent Computing. Ph.D. Dissertation. University of Illinois at Urbana-Champaign.
[28]
Naoki Kobayashi and Cosimo Laneve. 2017. Deadlock Analysis of Unbounded Process Networks. Inf. Comput. ’17 252, C (2017).
[29]
Naoki Kobayashi, Benjamin C. Pierce, and David N. Turner. 1999. Linearity and the Pi-calculus. TOPLAS ’99 21, 5 (1999).
[30]
Aditya Kulkarni, Yu David Liu, and Scott F. Smith. 2010. Task Types for Pervasive Atomicity. In OOPSLA ’10.
[31]
Leslie Lamport. 1978. Time, Clocks, and the Ordering of Events in a Distributed System. CACM ’78 21, 7 (1978).
[32]
Steven Lauterburg, Mirco Dotta, Darko Marinov, and Gul Agha. 2009. A Framework for State-Space Exploration of Java-Based Actor Programs. In ASE ’09.
[33]
Yuheng Long, Mehdi Bagherzadeh, Eric Lin, Ganesha Upadhyaya, and Hridesh Rajan. 2016. On Ordering Problems in Message Passing Software. In MODULARITY 2016.
[34]
Ana Milanova, Atanas Rountev, and Barbara G. Ryder. 2005. Parameterized Object Sensitivity for Points-to Analysis for Java. TSE ’05 14, 1 (2005).
[35]
Carroll Morgan. 1988. Procedures, parameters, and abstraction: Separate concerns. SCP ’88 11, 1 (1988).
[36]
Dimitris Mostrous and Vasco T. Vasconcelos. 2011. Session Typing for a Featherweight Erlang. In COORDINATION’11.
[37]
Dimitris Mostrous, Nobuko Yoshida, and Kohei Honda. 2009. Global Principal Typing in Partially Commutative Asynchronous Sessions. In ESOP ’09.
[38]
Mayur Naik, Alex Aiken, and John Whaley. 2006. Effective Static Race Detection for Java. In PLDI ’06.
[39]
Rumyana Neykova and Nobuko Yoshida. 2014. Multiparty Session Actors. In COORDINATION ’14.
[40]
Flemming Nielson and Hanne Riis Nielson. 1999. Type and Effect Systems. In Correct System Design: Recent Insights and Advances ’99.
[41]
Hridesh Rajan. 2015. Capsule-oriented Programming. In ICSE ’15.
[42]
Hridesh Rajan, Steven M. Kautz, Eric Lin, Sean L. Mooney, Yuheng Long, and Ganesha Upadhyaya. 2014. Capsule-oriented Programming in the Panini Language. Technical Report 14-08. Iowa State University.
[43]
Jan Schäfer and Arnd Poetzsch-Heffter. 2010. JCoBox: Generalizing Active Objects to Concurrent Components. In ECOOP ’10.
[44]
Yannis Smaragdakis, Jacob Evans, Caitlin Sadowski, Jaeheon Yi, and Cormac Flanagan. 2012. Sound Predictive Race Detection in Polynomial Time. In POPL ’12.
[45]
Herb Sutter and James Larus. 2005. Software and the Concurrency Revolution. Queue ’05 3, 7 (2005).
[46]
Samira Tasharofi, Rajesh K. Karmani, Steven Lauterburg, Axel Legay, Darko Marinov, and Gul Agha. 2012. TransDPOR: A Novel Dynamic Partial-order Reduction Technique for Testing Actor Programs. In FMOODS/FORTE ’12.
[47]
S. Tasharofi, M. Pradel, Y. Lin, and R. Johnson. 2013. Bita: Coverageguided, automatic testing of actor programs. In ASE ’13.
[48]
C. Tomlinson, W. Kim, M. Scheevel, V. Singh, B. Will, and G. Agha. 1988. Rosette: An Object-oriented Concurrent Systems Architecture. In OOPSLA/ECOOP ’88.
[49]
Jan Wen Voung, Ranjit Jhala, and Sorin Lerner. 2007. RELAY: Static Race Detection on Millions of Lines of Code. In ESEC-FSE ’07.
[50]
Tiejun Wang and Scott F. Smith. 2001. Precise Constraint-Based Type Inference for Java. In ECOOP ’01.
[51]
Adam Welc, Suresh Jagannathan, and Antony Hosking. 2005. Safe Futures for Java. In OOPSLA ’05.
[52]
A.K. Wright and M. Felleisen. 1994. A Syntactic Approach to Type Soundness. Inf. Comput. ’94 115, 1 (1994).
[53]
Akinori Yonezawa (Ed.). 1990. ABCL: An Object-oriented Concurrent System. MIT Press, Cambridge, MA, USA.

Cited By

View all
  • (2023)𝜇Akka: Mutation Testing for Actor Concurrency in Akka using Real-World BugsProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616362(262-274)Online publication date: 30-Nov-2023
  • (2023)Special Delivery: Programming with Mailbox TypesProceedings of the ACM on Programming Languages10.1145/36078327:ICFP(78-107)Online publication date: 31-Aug-2023
  • (2020)Actor concurrency bugs: a comprehensive study on symptoms, root causes, API usages, and differencesProceedings of the ACM on Programming Languages10.1145/34282824:OOPSLA(1-32)Online publication date: 13-Nov-2020
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
AGERE 2017: Proceedings of the 7th ACM SIGPLAN International Workshop on Programming Based on Actors, Agents, and Decentralized Control
October 2017
57 pages
ISBN:9781450355162
DOI:10.1145/3141834
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 23 October 2017

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Order types
  2. asynchronous mes- sage passing concurrency
  3. flow behavior
  4. happens-before relation
  5. message races
  6. messaging behavior
  7. static reasoning

Qualifiers

  • Research-article

Funding Sources

Conference

SPLASH '17
Sponsor:

Acceptance Rates

Overall Acceptance Rate 19 of 35 submissions, 54%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)42
  • Downloads (Last 6 weeks)7
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2023)𝜇Akka: Mutation Testing for Actor Concurrency in Akka using Real-World BugsProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616362(262-274)Online publication date: 30-Nov-2023
  • (2023)Special Delivery: Programming with Mailbox TypesProceedings of the ACM on Programming Languages10.1145/36078327:ICFP(78-107)Online publication date: 31-Aug-2023
  • (2020)Actor concurrency bugs: a comprehensive study on symptoms, root causes, API usages, and differencesProceedings of the ACM on Programming Languages10.1145/34282824:OOPSLA(1-32)Online publication date: 13-Nov-2020
  • (2020)An Empirical Study on the Use and Misuse of Java 8 StreamsFundamental Approaches to Software Engineering10.1007/978-3-030-45234-6_5(97-118)Online publication date: 17-Apr-2020
  • (2019)Modal assertions for actor correctnessProceedings of the 9th ACM SIGPLAN International Workshop on Programming Based on Actors, Agents, and Decentralized Control10.1145/3358499.3361221(11-20)Online publication date: 22-Oct-2019
  • (2019)Safe automated refactoring for intelligent parallelization of Java 8 streamsProceedings of the 41st International Conference on Software Engineering10.1109/ICSE.2019.00072(619-630)Online publication date: 25-May-2019
  • (2018)What do concurrency developers ask about?Proceedings of the 12th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement10.1145/3239235.3239524(1-10)Online publication date: 11-Oct-2018

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media