Abstract
We present an approach for comparing two closely related concurrent programs, whose goal is to give feedback about interesting differences without relying on user-provided assertions. This approach compares two programs in terms of cross-thread interferences and data-flow, under a parametrized abstraction which can detect any difference in the limit. We introduce a partial order relation between these abstractions such that a program change that leads to a “smaller” abstraction is more likely to be regression-free from the perspective of concurrency. On the other hand, incomparable or bigger abstractions, which are an indication of introducing new, possibly undesired, behaviors, lead to succinct explanations of the semantic differences.
Similar content being viewed by others
Notes
By configuration, we mean the tuple of thread-local states together with the state of the shared memory.
Our framework is not bound to a specific set of program order constraints and statements to be preserved in the projected traces—they can be chosen arbitrarily.
The synchronization statements are important only for defining the program semantics. As it will be clear in Sect. 4, the abstract traces are agnostic to the synchronization statements used in the program.
Our framework can be extended such that the projection operator removes only a user-specified fragment of the program order.
For a set A, \(\mathcal {P}(A)\) denotes the set of subsets of A.
Therefore, so is a total order on writes to the same variable, and \( rf \) a total function from reads of a variable x to writes to x (according to Definition 1).
The simple syntax we considered in Sect. 3 doesn’t include acquire/release actions, but they can be easily modeled using /.
We denote by \(\cdot \) the concatenation operator.
Recall that we consider programs without looping constructs and procedure calls.
\(A/_\equiv \) is the quotient of the set (relation) A with respect to \(\equiv \).
They are available at https://github.com/thorstent/ConcurrencySwapper and https://github.com/thorstent/Liss.
We refer to the smallest value of k for which the buggy version is not a (V, k)-refinement of the fixed version.
References
Abadi M, Lamport L (1991) The existence of refinement mappings. Theor Comput Sci 82(2):253–284
Biere A, Bloem R (eds) (2014) Computer aided verification—CAV 2014, Vienna, Austria, 2014. Proceedings, volume 8559 of LNCS. Springer, Berlin
Bouajjani A, Derevenetc E, Meyer R (2014) Robustness against relaxed memory models. In: Hasselbring W, Ehmke NC (eds) Software engineering, Kiel, Deutschland, volume 227 of LNI, pp 85–86
Burckhardt S, Musuvathi M (2008) Effective program verification for relaxed memory models. In: CAV 2008, pp 107–120
Cerný P, Clarke EM, Henzinger TA, Radhakrishna A, Ryzhyk L, Samanta R, Tarrach T (2017) From non-preemptive to preemptive scheduling using synchronization synthesis. Form Methods Syst Des 50(2–3):97–139
Cerný P, Henzinger TA, Radhakrishna A, Ryzhyk L, Tarrach T (2013) Efficient synthesis for concurrency by semantics-preserving transformations. In: Sharygina N, Veith H (eds) computer aided verification —CAV 2013, Saint Petersburg, 2013, volume 8044 of lecture notes in computer science. Springer, Berlin, pp 951–967
Cerný P, Henzinger TA, Arjun R, Leonid R, Thorsten T Regression-free synthesis for concurrency. In: Biere and Bloem [2], pp 568–584
Chaki S, Gurfinkel A, Strichman O (2015) Regression verification for multi-threaded programs (with extensions to locks and dynamic thread creation). Form Methods Syst Des 47(3):287–301
Clarke E, Kroening D, Lerda F (2004) A tool for checking ANSI-C programs. In: Jensen K, Podelski A (eds) Tools and algorithms for the construction and analysis of systems (TACAS 2004), volume 2988 of LNCS. Springer, Berlin, pp 168–176
Farzan A, Kincaid Z, Podelski A (2013) Inductive data flow graphs. In: Giacobazzi R, Cousot R (eds) The 40th annual ACM SIGPLAN-SIGACT symposium on principles of programming languages, POPL ’13, Rome, Italy, 23–25 January 2013. ACM, pp 129–142
Godlin B, Strichman O (2008) Inference rules for proving the equivalence of recursive procedures. Acta Inf 45(6):403–439
Inverso O, Nguyen TL, Fischer B, Torre La S, Parlato G (2015) Lazy-cseq: a context-bounded model checking tool for multi-threaded c-programs. In: Cohen MB, Grunske L, Whalen M (eds) 30th IEEE/ACM international conference on automated software engineering, ASE 2015, Lincoln, NE, USA, 9–13 Nov 2015. IEEE Computer Society, pp 807–812
Inverso O, Tomasco E, Fischer B, Torre La S, Parlato G Bounded model checking of multi-threaded C programs via lazy sequentialization. In: Biere and Bloem [2], pp 585–602
Jackson D, Ladd DA (1994) Semantic diff: a tool for summarizing the effects of modifications. In: Proceedings of the international conference on software maintenance, ICSM 1994, Victoria, BC, Canada, Sept 1994. IEEE Computer Society, pp 243–252
Joshi S, Lahiri SK, Lal A (2012) Underspecified harnesses and interleaved bugs. In: Field J, Hicks M (eds) Proceedings of the 39th ACM SIGPLAN-SIGACT symposium on principles of programming languages, POPL 2012, Philadelphia, Pennsylvania, USA, 22–28 January 2012. ACM, pp 19–30
Lahiri SK, Hawblitzel C, Kawaguchi M, Rebêlo H (2012) Symdiff: a language-agnostic semantic diff tool for imperative programs. In: Proceedings of the 24th international conference on computer aided verification, CAV’12
Lahiri SK, McMillan KL, Sharma R, Hawblitzel C (2013) Differential assertion checking. In: Joint meeting of the european software engineering conference and the ACM SIGSOFT symposium on the foundations of software engineering, ESEC/FSE’13, Saint Petersburg, Russian Federation, 18–26 Aug 2013. ACM, pp 345–355
Logozzo F, Lahiri SK, Fähndrich M, Blackshear S (2014) Verification modulo versions: towards usable verification. In: ACM SIGPLAN conference on programming language design and implementation, PLDI ’14, Edinburgh, United Kingdom, 09–11 June 2014. ACM, p 32
Lu S, Park S, Seo E, Zhou Y (2008) Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In: Eggers SJ, Larus JR (eds) Proceedings of the 13th international conference on architectural support for programming languages and operating systems, ASPLOS 2008, Seattle, WA, USA, 1–5 Mar 2008. ACM, pp 329–339
Marinescu PD, Cadar C (2013) KATCH: high-coverage testing of software patches. In: Joint meeting of the european software engineering conference and the ACM SIGSOFT symposium on the foundations of software engineering, ESEC/FSE’13, Saint Petersburg, Russian Federation, 18–26 Aug 2013. ACM, pp 235–245
Person S, Dwyer MB, Elbaum SG, Pasareanu CS (2008) Differential symbolic execution. In: Proceedings of the 16th ACM SIGSOFT international symposium on foundations of software engineering, 2008, Atlanta, Georgia, USA, 9–14 Nov 2008. ACM, pp 226–237
Rosen BK, Wegman MN, Zadeck FK (1988) Global value numbers and redundant computations. In: Ferrante J, Mager P (eds) Conference record of the fifteenth annual ACM symposium on principles of programming languages, San Diego, California, USA, 10–13 Jan 1988. ACM Press, pp 12–27
Shasha D, Snir M (1988) Efficient and correct execution of parallel programs that share memory. ACM Trans Program Lang Syst 10(2):282–312
Acknowledgements
This work is supported in part by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation program (Grant Agreement No. 678177).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Bouajjani, A., Enea, C. & Lahiri, S.K. Abstract semantic diffing of evolving concurrent programs. Form Methods Syst Des 54, 4–26 (2019). https://doi.org/10.1007/s10703-018-0322-2
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10703-018-0322-2