Skip to main content

Advertisement

SpringerLink
Log in
Menu
Find a journal Publish with us
Search
Cart
Book cover

International Conference on Computer Aided Verification

CAV 2012: Computer Aided Verification pp 3Cite as

  1. Home
  2. Computer Aided Verification
  3. Conference paper
Synthesizing Programs with Constraint Solvers

Synthesizing Programs with Constraint Solvers

  • Rastislav Bodik18 &
  • Emina Torlak18 
  • Conference paper
  • 3588 Accesses

  • 2 Citations

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 7358)

Abstract

Classical synthesis derives programs from a specification. We show an alternative approach where programs are obtained through search in a space of candidate programs. Searching for a program that meets a specification frees us from having to develop a sufficiently complete set of derivation rules, a task that is more challenging than merely describing the syntactic shape of the desired program. To make the search for a program efficient, we exploit symbolic constraint solving, lifted to synthesis from the setting of program verification.

We start by describing the interface to the synthesizer, which the programmer uses to specify the space of candidate programs as well as the desired correctness condition φ. The space is defined by a program template whose missing expressions are described with a grammar. The correctness condition is a multi-modal specification, given as a combination of assertions, input / output pairs, and traces.

Next, we describe several algorithms for solving the synthesis problem ∃ P ∀ x φ(x,P(x)). The key idea is to reduce the problem from 2QBF to SAT by sampling the space of inputs, which eliminates the universal quantification over x.

Finally, we show how to encode the resulting SAT problem in relational logic, and how this encoding can be used to solve a range of related problems that arise in synthesis, from verification to program state repair. We will conclude with open problems on constraint-based synthesis.

Download conference paper PDF

Author information

Authors and Affiliations

  1. University of California, Berkeley, USA

    Rastislav Bodik & Emina Torlak

Authors
  1. Rastislav Bodik
    View author publications

    You can also search for this author in PubMed Google Scholar

  2. Emina Torlak
    View author publications

    You can also search for this author in PubMed Google Scholar

Editor information

Editors and Affiliations

  1. Dept. of Computer Science, University of Illinois at Urbana-Champaign, 3226 Siebel Center, 201 N. Goodwin Avenue, 61801-2302, Urbana, IL, USA

    P. Madhusudan

  2. Dept. of Electrical Engineering and Computer Science, University of California, Berkeley, 253 Cory Hall # 1770, 94720-1770, Berkeley, CA, USA

    Sanjit A. Seshia

Rights and permissions

Reprints and Permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bodik, R., Torlak, E. (2012). Synthesizing Programs with Constraint Solvers. In: Madhusudan, P., Seshia, S.A. (eds) Computer Aided Verification. CAV 2012. Lecture Notes in Computer Science, vol 7358. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-31424-7_3

Download citation

  • .RIS
  • .ENW
  • .BIB
  • DOI: https://doi.org/10.1007/978-3-642-31424-7_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-31423-0

  • Online ISBN: 978-3-642-31424-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Share this paper

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Search

Navigation

  • Find a journal
  • Publish with us

Discover content

  • Journals A-Z
  • Books A-Z

Publish with us

  • Publish your research
  • Open access publishing

Products and services

  • Our products
  • Librarians
  • Societies
  • Partners and advertisers

Our imprints

  • Springer
  • Nature Portfolio
  • BMC
  • Palgrave Macmillan
  • Apress
  • Your US state privacy rights
  • Accessibility statement
  • Terms and conditions
  • Privacy policy
  • Help and support

167.114.118.210

Not affiliated

Springer Nature

© 2023 Springer Nature