Abstract
To solve a problem with a dynamic programming algorithm, one must reformulate the problem such that its solution can be formed from solutions to overlapping subproblems. Because overlapping subproblems may not be apparent in the specification, it is desirable to obtain the algorithm directly from the specification. We describe a semi-automatic synthesizer of linear-time dynamic programming algorithms. The programmer supplies a declarative specification of the problem and the operators that might appear in the solution. The synthesizer obtains the algorithm by searching a space of candidate algorithms; internally, the search is implemented with constraint solving. The space of candidate algorithms is defined with a program template reusable across all linear-time dynamic programming algorithms, which we characterize as first-order recurrences. This paper focuses on how to write the template so that the constraint solving process scales to real-world linear-time dynamic programming algorithms. We show how to reduce the space with (i)~symmetry reduction and (ii)~domain knowledge of dynamic programming algorithms. We have synthesized algorithms for variants of maximal substring matching, an assembly-line optimization, and the extended Euclid algorithm. We have also synthesized a problem outside the class of first-order recurrences, by composing three instances of the algorithm template.
- D. Andre and S. J. Russell. State abstraction for programmable reinforcement learning agents. In AAAI/IAAI, pages 119--125, 2002. Google Scholar
Digital Library
- e. a. Armando Solar-Lezama. The Sketch synthesizer. http://sketch1.csail.mit.edu/demo/.Google Scholar
- R. Bellman. The theory of dynamic programming. Bull. Amer. Math. Soc., 60:503--515, 1954.Google Scholar
Cross Ref
- R. Bird and O. de Moor. The Algebra of Programming. Prentice-Hall, 1996. Google Scholar
Digital Library
- R. Bodık, S. Chandra, J. Galenson, D. Kimelman, N. Tung, S. Barman, and C. Rodarmor. Programming with angelic nondeterminism. In Hermenegildo and Palsberg DBLP:Conf. POPL 2010, pages 339--352. Google Scholar
Digital Library
- T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. The MIT Press, New York, 2001. Google Scholar
Digital Library
- S. Gulwani, S. Srivastava, and R. Venkatesan. Program analysis as constraint solving. In PLDI, 2008. Google Scholar
Digital Library
- S. Gulwani, S. Srivastava, and R. Venkatesan. Constraint-based invariant inference over predicate abstraction. In VMCAI '09: Proceedings of the 2009 Conference on Verification Model Checking and Abstract Interpretation, 2009. Google Scholar
Digital Library
- M. V. Hermenegildo and J. Palsberg, editors. Proceedings of the 37th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2010, Madrid, Spain, January 17--23, 2010. ACM, 2010. Google Scholar
- S. Itzhaky, S. Gulwani, N. Immerman, and M. Sagiv. A simple inductive synthesis methodology and its applications. In OOPSLA, pages 36--46, 2010. Google Scholar
Digital Library
- S. Itzhaky, S. Gulwani, N. Immerman, and M. Sagiv. A simple inductive synthesis methodology and its applications. In W. R. Cook, S. Clarke, and M. C. Rinard, editors, OOPSLA, pages 36--46. ACM, 2010. Google Scholar
Digital Library
- T. A. Lau, S. A. Wolfman, P. Domingos, and D. S. Weld. Programming by demonstration using version space algebra. Machine Learning, 53(1--2):111--156, 2003. Google Scholar
Digital Library
- U. Manber. Introduction to Algorithms: A Creative Approach. Addison-Wesley Longman Publishing Co., Inc. Boston, MA, USA, 1989. Google Scholar
Digital Library
- S. Nedunuri and W. R. Cook. Synthesis of fast programs for maximum segment sum problems. In J. G. Siek and B. F. 0002, editors, GPCE, pages 117--126. ACM, 2009. Google Scholar
Digital Library
- S. Nedunuri, D. R. Smith, and W. R. Cook. A class of greedy algorithms and its relation to greedoids. In A. Cavalcanti, D. Déharbe, M.-C. Gaudel, and J. Woodcock, editors, ICTAC, volume 6255 of Lecture Notes in Computer Science, pages 352--366. Springer, 2010. Google Scholar
Digital Library
- R. Paige. Symbolic finite differencing - part i. In N. D. Jones, editor, ESOP, volume 432 of Lecture Notes in Computer Science, pages 36--56. Springer, 1990. Google Scholar
Digital Library
- I. Sasano, Z. Hu, M. Takeichi, and M. Ogawa. Make it practical: A generic linear-time algorithm for solving maximum-weightsum problems. In In Proceedings of the 5th ACM SIGPLAN International Conference on Functional Programming (ICFP'00, pages 137--149. ACM Press, 2000. Google Scholar
Digital Library
- I. Shlyakhter. Generating effective symmetry-breaking predicates for search problems. Discrete Applied Mathematics, 155(12):1539--1548, 2007. Google Scholar
Digital Library
- D. Smith. Structure and design of global search algorithms. Technical report, Kestrel Institute, 1998.Google Scholar
- A. Solar-Lezama, G. Arnold, L. Tancau, R. Bodik, V. Saraswat, and S. Seshia. Sketching stencils. In PLDI, pages 167--178, 2007. Google Scholar
Digital Library
- A. Solar-Lezama, C. G. Jones, and R. Bodik. Sketching concurrent data structures. In PLDI, 2008. Google Scholar
Digital Library
- A. Solar-Lezama, L. Tancau, R. Bodik, S. Seshia, and V. Saraswat. Combinatorial sketching for finite programs. In ASPLOS-XII: Proceedings of the 12th international conference on Architectural support for programming languages and operating systems, pages 404--415. ACM, 2006. Google Scholar
Digital Library
- S. Srivastava and S. Gulwani. Program verification using templates over predicate abstraction. In PLDI, 2009. Google Scholar
Digital Library
- S. Srivastava, S. Gulwani, and J. S. Foster. VS3: SMT solvers for program verification. In CAV, 2009. Google Scholar
Digital Library
- S. Srivastava, S. Gulwani, and J. S. Foster. From program verification to program synthesis. In POPL, 2010. Google Scholar
Digital Library
- S. Srivastava, S. Gulwani, and J. S. Foster. From program verification to program synthesis. In Hermenegildo and Palsberg DBLP:Conf. POPL 2010, pages 313--326. Google Scholar
Digital Library
- Wikipedia. Dynamic programming, Aug. 2011.Google Scholar
- F. F. Yao. Efficient dynamic programming using quadrangle inequalities. In Proceedings of the twelfth annual ACM symposium on Theory of computing, STOC '80, pages 429--435, New York, NY, USA, 1980. ACM. Google Scholar
Digital Library
Index Terms
Synthesis of first-order dynamic programming algorithms
Recommendations
Relational program synthesis
This paper proposes relational program synthesis, a new problem that concerns synthesizing one or more programs that collectively satisfy a relational specification. As a dual of relational program verification, relational program synthesis is an ...
Synthesis of first-order dynamic programming algorithms
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsTo solve a problem with a dynamic programming algorithm, one must reformulate the problem such that its solution can be formed from solutions to overlapping subproblems. Because overlapping subproblems may not be apparent in the specification, it is ...
From program verification to program synthesis
POPL '10This paper describes a novel technique for the synthesis of imperative programs. Automated program synthesis has the potential to make programming and the design of systems easier by allowing programs to be specified at a higher-level than executable ...







Comments