Mixing Type Checking and Symbolic Execution (Extended Version)

Static analysis designers must carefully balance precision and efficiency. In our experience, many static analysis tools are built around an elegant, core algorithm, but that algorithm is then extensively tweaked to add just enough precision for the coding idioms seen in practice, without sacrificing too much efficiency. There are several downsides to adding precision in this way: the tool’s implementation becomes much more complicated; it can be hard for an end-user to interpret the tool’s results; and as software systems vary tremendously in their coding styles, it may require significant algorithmic engineering to enhance a tool to perform well in a particular software domain. In this paper, we present MIX, a novel system that mixes type checking and symbolic execution. The key aspect of our approach is that these analyses are applied independently on disjoint parts of the program, in an off-the-shelf manner. At the boundaries between nested type checked and symbolically executed code regions, we use special mix rules to communicate information between the offthe-shelf systems. The resulting mixture is a provably sound analysis that is more precise than type checking alone and more efficient than exclusive symbolic execution. In addition, we also describe a prototype implementation, MIXY, for C. MIXY checks for potential null dereferences by mixing a null/non-null type qualifier inference system with a symbolic executor.

[1]  Ranjit Jhala,et al.  Low-level liquid types , 2010, POPL '10.

[2]  Joseph M. Morris A Proof of the Schorr-Waite Algorithm , 1982 .

[3]  Rupak Majumdar,et al.  Hybrid Concolic Testing , 2007, 29th International Conference on Software Engineering (ICSE'07).

[4]  Adam A. Porter,et al.  Using symbolic evaluation to understand behavior in configurable software systems , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[5]  Sorin Lerner,et al.  Composing dataflow analyses and transformations , 2002, POPL '02.

[6]  Patrick Maxim Rondon,et al.  Liquid types , 2008, PLDI '08.

[7]  Cormac Flanagan,et al.  Hybrid type checking , 2006, POPL '06.

[8]  Jeffrey S. Foster,et al.  LOCKSMITH: context-sensitive correlation analysis for race detection , 2006, PLDI '06.

[9]  Koushik Sen DART: Directed Automated Random Testing , 2009, Haifa Verification Conference.

[10]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

[11]  Patrice Godefroid,et al.  Compositional dynamic test generation , 2007, POPL '07.

[12]  Greg Nelson,et al.  Simplification by Cooperating Decision Procedures , 1979, TOPL.

[13]  Jeffrey S. Foster,et al.  Flow-insensitive type qualifiers , 2006, TOPL.

[14]  Kwangkeun Yi,et al.  Automatic generation and management of interprocedural program analyses , 1993, POPL '93.

[15]  George C. Necula,et al.  CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs , 2002, CC.

[16]  Sumit Gulwani,et al.  Combining abstract interpreters , 2006, PLDI '06.

[17]  Dawson R. Engler,et al.  KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs , 2008, OSDI.

[18]  Joseph M. Morris A General Axiom of Assignment , 1982 .

[19]  Dawson R. Engler,et al.  EXE: Automatically Generating Inputs of Death , 2008, TSEC.

[20]  Richard Bornat,et al.  Proving Pointer Programs in Hoare Logic , 2000, MPC.

[21]  Calvin Lin,et al.  Error checking with client-driven pointer analysis , 2005, Sci. Comput. Program..

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

[23]  Thomas A. Henzinger,et al.  Abstractions from proofs , 2004, POPL.

[24]  Matthew B. Dwyer,et al.  Bandera: extracting finite-state models from Java source code , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[25]  David L. Dill,et al.  A Decision Procedure for Bit-Vectors and Arrays , 2007, CAV.

[26]  Frank Pfenning,et al.  Dependent types in practical programming , 1999, POPL '99.

[27]  Jens Palsberg,et al.  Type Systems: Advances and Applications , 2007, The Compiler Design Handbook, 2nd ed..

[28]  Sriram K. Rajamani,et al.  The SLAM project: debugging system software via static analysis , 2002, POPL '02.

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