Armando Solar-Lezama
Graduate Student  
UC Berkeley  
   
asolar_at_eecs.berkeley.edu  
 
Programming by Sketching:   StreamBit   SKETCH  

Programming with sketches is a semi-automatic approach for the rapid development of high-performance applications. This approach allows a programmer to write clean and portable reference code, and then obtain a high-quality implementation by simply sketching its outlines. Subsequently, a compiler automatically fills in the missing details while also ensuring that a completed sketch is faithful to the input reference code.

A sketch is a partial specification of the implementation, and as such, it has several benefits to programmer productivity and code correctness: (1) a sketch is easier to write compared to a complete implementation; (2) the sketching compiler rejects a ``buggy'' sketch, thus allowing the programmer to quickly evaluate sophisticated implementation ideas by focusing on exploring algorithmic details rather than on orchestrating low-level details.

We have implemented two different Sketching systems: StreamBit and SKETCH. The two systems are based on two different approaches to sketching, each of which has different strengths and weaknesses. StreamBit is a transformation system; it works by applying a sequence of semantics-preserving transformations, which are guided by the sketch. SKETCH, on the other hand, is based on combinatorial search; the sketch is simply a program with holes, and the final implementation is obtained by filling in the holes, with no transformations involved.