Growing solver-aided languages with rosette

  • Authors:
  • Emina Torlak;Rastislav Bodik

  • Affiliations:
  • University of California Berkeley, Berkeley, CA, USA;University of California Berkeley, Berkeley, CA, USA

  • Venue:
  • Proceedings of the 2013 ACM international symposium on New ideas, new paradigms, and reflections on programming & software
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

SAT and SMT solvers have automated a spectrum of programming tasks, including program synthesis, code checking, bug localization, program repair, and programming with oracles. In principle, we obtain all these benefits by translating the program (once) to a constraint system understood by the solver. In practice, however, compiling a language to logical formulas is a tricky process, complicated by having to map the solution back to the program level and extend the language with new solver-aided constructs, such as symbolic holes used in synthesis. This paper introduces ROSETTE, a framework for designing solver-aided languages. ROSETTE is realized as a solver-aided language embedded in Racket, from which it inherits extensive support for meta-programming. Our framework frees designers from having to compile their languages to constraints: new languages, and their solver-aided constructs, are defined by shallow (library-based) or deep (interpreter-based) embedding in ROSETTE itself. We describe three case studies, by ourselves and others, of using ROSETTE to implement languages and synthesizers for web scraping, spatial programming, and superoptimization of bitvector programs.