TRANSIT: specifying protocols with concolic snippets

With the maturing of technology for model checking and constraint solving, there is an emerging opportunity to develop programming tools that can transform the way systems are specified. In this paper, we propose a new way to program distributed protocols using concolic snippets. Concolic snippets are sample execution fragments that contain both concrete and symbolic values. The proposed approach allows the programmer to describe the desired system partially using the traditional model of communicating extended finite-state-machines (EFSM), along with high-level invariants and concrete execution fragments. Our synthesis engine completes an EFSM skeleton by inferring guards and updates from the given fragments which is then automatically analyzed using a model checker with respect to the desired invariants. The counterexamples produced by the model checker can then be used by the programmer to add new concrete execution fragments that describe the correct behavior in the specific scenario corresponding to the counterexample. We describe TRANSIT, a language and prototype implementation of the proposed specification methodology for distributed protocols. Experimental evaluations of TRANSIT to specify cache coherence protocols show that (1) the algorithm for expression inference from concolic snippets can synthesize expressions of size 15 involving typical operators over commonly occurring types, (2) for a classical directory-based protocol, TRANSIT automatically generates, in a few seconds, a complete implementation from a specification consisting of the EFSM structure and a few concrete examples for every transition, and (3) a published partial description of the SGI Origin cache coherence protocol maps directly to symbolic examples and leads to a complete implementation in a few iterations, with the programmer correcting counterexamples resulting from underspecified transitions by adding concrete examples in each iteration.

[1]  Wolfgang Thomas,et al.  Facets of Synthesis: Revisiting Church's Problem , 2009, FoSSaCS.

[2]  Arvind,et al.  Automatic synthesis of cache-coherence protocol processors using Bluespec , 2005, Proceedings. Second ACM and IEEE International Conference on Formal Methods and Models for Co-Design, 2005. MEMOCODE '05..

[3]  Ruzica Piskac,et al.  Software synthesis procedures , 2012, Commun. ACM.

[4]  David Harel,et al.  Can Programming Be Liberated , 2008 .

[5]  Sumit Gulwani,et al.  Synthesis of loop-free programs , 2011, PLDI '11.

[6]  Somesh Jha,et al.  Verification of the Futurebus+ cache coherence protocol , 1993, Formal Methods Syst. Des..

[7]  David J. Lilja,et al.  So many states, so little time: verifying memory coherence in the Cray X1 , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[8]  Mark R. Tuttle,et al.  Going with the Flow: Parameterized Verification Using Message Flows , 2008, 2008 Formal Methods in Computer-Aided Design.

[9]  Bernd Finkbeiner,et al.  Lazy Synthesis , 2012, VMCAI.

[10]  David Harel,et al.  Behavioral programming , 2012, CACM.

[11]  Rishabh Singh,et al.  Synthesizing data structure manipulations from storyboards , 2011, ESEC/FSE '11.

[12]  David Harel,et al.  Come, let's play - scenario-based programming using LSCs and the play-engine , 2003 .

[13]  Koushik Sen,et al.  CUTE: a concolic unit testing engine for C , 2005, ESEC/FSE-13.

[14]  Gerard J. Holzmann,et al.  The SPIN Model Checker - primer and reference manual , 2003 .

[15]  Sumit Gulwani,et al.  Automating string processing in spreadsheets using input-output examples , 2011, POPL '11.

[16]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[17]  David Harel Can Programming Be Liberated, Period? , 2008, Computer.

[18]  Sanjit A. Seshia Sciduction: Combining induction, deduction, and structure for verification and synthesis , 2012, DAC Design Automation Conference 2012.

[19]  Armando Solar-Lezama,et al.  Programming by sketching for bit-streaming programs , 2005, PLDI '05.

[20]  Seif Haridi,et al.  Distributed Algorithms , 1992, Lecture Notes in Computer Science.

[21]  Sumit Gulwani,et al.  From program verification to program synthesis , 2010, POPL '10.

[22]  Sumit Gulwani,et al.  Oracle-guided component-based program synthesis , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[23]  Doron A. Peled,et al.  MCGP: A Software Synthesis Tool Based on Model Checking and Genetic Programming , 2010, ATVA.

[24]  D. Lenoski,et al.  The SGI Origin: A ccnuma Highly Scalable Server , 1997, Conference Proceedings. The 24th Annual International Symposium on Computer Architecture.

[25]  Milo M. K. Martin,et al.  Multifacet's general execution-driven multiprocessor simulator (GEMS) toolset , 2005, CARN.

[26]  David A. Wood,et al.  A Primer on Memory Consistency and Cache Coherence , 2012, Synthesis Lectures on Computer Architecture.

[27]  Armando Solar-Lezama,et al.  Sketching concurrent data structures , 2008, PLDI '08.

[28]  Alan J. Hu,et al.  Protocol verification as a hardware design aid , 1992, Proceedings 1992 IEEE International Conference on Computer Design: VLSI in Computers & Processors.