Termination and Cost Analysis of Loops with Concurrent Interleavings

By following a rely-guarantee style of reasoning, we present a novel termination analysis for concurrent programs that, in order to prove termination of a considered loop, makes the assumption that the “shared-data that is involved in the termination proof of the loop is modified a finite number of times”. In a subsequent step, it proves that this assumption holds in all code whose execution might interleave with such loop. At the core of the analysis, we use a may-happen-in-parallel analysis to restrict the set of program points whose execution can interleave with the considered loop. Interestingly, the same kind of reasoning can be applied to infer upper bounds on the number of iterations of loops with concurrent interleavings. To the best of our knowledge, this is the first method to automatically bound the cost of such kind of loops.

[1]  Martin Odersky,et al.  Scala Actors: Unifying thread-based and event-based programming , 2009, Theor. Comput. Sci..

[2]  Elvira Albert,et al.  Closed-Form Upper Bounds in Static Cost Analysis , 2011, Journal of Automated Reasoning.

[3]  Arnd Poetzsch-Heffter,et al.  JCoBox: Generalizing Active Objects to Concurrent Components , 2010, ECOOP.

[4]  Mario Bravetti,et al.  A Petri Net Based Analysis of Deadlocks for Active Objects and Futures , 2012, FACS.

[5]  Cosimo Laneve,et al.  Analysis of Deadlocks in Object Groups , 2011, FMOODS/FORTE.

[6]  Elvira Albert,et al.  Analysis of May-Happen-in-Parallel in Concurrent Objects , 2012, FMOODS/FORTE.

[7]  Paul Feautrier,et al.  Multi-dimensional Rankings, Program Termination, and Complexity Bounds of Flowchart Programs , 2010, SAS.

[8]  Barbara G. Ryder,et al.  Parameterized object sensitivity for points-to analysis for Java , 2005, TSEM.

[9]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[10]  Joe Armstrong,et al.  Concurrent programming in ERLANG , 1993 .

[11]  Alan Mycroft,et al.  Kilim: Isolation-Typed Actors for Java , 2008, ECOOP.

[12]  Sumit Gulwani,et al.  The reachability-bound problem , 2010, PLDI '10.

[13]  Andreas Podelski,et al.  Proving program termination , 2011, Commun. ACM.

[14]  Henny B. Sipma,et al.  Linear Ranking with Reachability , 2005, CAV.

[15]  Andreas Podelski,et al.  Proving thread termination , 2007, PLDI '07.

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

[17]  Theo D'Hondt ECOOP 2010 - Object-Oriented Programming, 24th European Conference, Maribor, Slovenia, June 21-25, 2010. Proceedings , 2010, ECOOP.

[18]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[19]  Stephen N. Freund,et al.  Thread-Modular Verification for Shared-Memory Programs , 2002, ESOP.

[20]  Andrey Rybalchenko,et al.  Compositional Termination Proofs for Multi-threaded Programs , 2012, TACAS.

[21]  Elvira Albert,et al.  Cost Analysis of Concurrent OO Programs , 2011, APLAS.

[22]  Frank S. de Boer,et al.  A Complete Guide to the Future , 2007, ESOP.

[23]  Gul A. Agha,et al.  ACTORS - a model of concurrent computation in distributed systems , 1985, MIT Press series in artificial intelligence.

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

[25]  Jan Vitek,et al.  ECOOP 2008 - Object-Oriented Programming, 22nd European Conference, Paphos, Cyprus, July 7-11, 2008, Proceedings , 2008, ECOOP.

[26]  Sumit Gulwani,et al.  Bound Analysis of Imperative Programs with the Size-Change Abstraction , 2011, SAS.