Skip to main content

Evolutionary Program Sketching

  • Conference paper
  • First Online:

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

Abstract

Program synthesis can be posed as a satisfiability problem and approached with generic SAT solvers. Only short programs can be however synthesized in this way. Program sketching by Solar-Lezama assumes that a human provides a partial program (sketch), and that synthesis takes place only within the uncompleted parts of that program. This allows synthesizing programs that are overall longer, while maintaining manageable computational effort. In this paper, we propose Evolutionary Program Sketching (EPS), in which the role of sketch provider is handed over to genetic programming (GP). A GP algorithm evolves a population of partial programs, which are being completed by a solver while evaluated. We consider several variants of EPS, which vary in program terminals used for completion (constants, variables, or both) and in the way the completion outcomes are propagated to future generations. When applied to a range of benchmarks, EPS outperforms the conventional GP, also when the latter is given similar time budget.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    Technically, the solver may also time-out, which we interpret as lack of feasible completion too.

  2. 2.

    http://smtlib.cs.uiowa.edu/logics.shtml.

  3. 3.

    https://github.com/iwob.

  4. 4.

    https://github.com/kkrawiec.

References

  1. Gulwani, S., Jha, S., Tiwari, A., Venkatesan, R.: Component based synthesis applied to bitvector programs. Technical report, MSR-TR-2010-12, February 2010

    Google Scholar 

  2. Jha, S., Gulwani, S., Seshia, S.A., Tiwari, A.: Oracle-guided component-based program synthesis. In: 29th International Conference on Software Engineering (ICSE 2010), pp. 215–224, May 2010

    Google Scholar 

  3. Srivastava, S., Gulwani, S., Foster, J.S.: From program verification to program synthesis. In: Proceedings of the 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2010, pp. 313–326. ACM, New York (2010)

    Google Scholar 

  4. Solar-Lezama, A.: Program synthesis by sketching. Ph.D. thesis, Electrical Engineering and Computer Science, University of California, Berkeley, USA (fall 2008)

    Google Scholar 

  5. Barrett, C., Fontaine, P., Tinelli, C.: The Satisfiability Modulo Theories Library (SMT-LIB) (2016). www.SMT-LIB.org

  6. Solar-Lezama, A.: Program sketching. Int. J. Softw. Tools Technol. Transfer 15(5), 475–495 (2013)

    Article  Google Scholar 

  7. Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). doi:10.1007/978-3-540-78800-3_24

    Chapter  Google Scholar 

  8. Johnson, C.G.: Genetic programming with fitness based on model checking. In: Ebner, M., O’Neill, M., Ekárt, A., Vanneschi, L., Esparcia-Alcázar, A.I. (eds.) EuroGP 2007. LNCS, vol. 4445, pp. 114–124. Springer, Heidelberg (2007). doi:10.1007/978-3-540-71605-1_11

    Chapter  Google Scholar 

  9. Katz, G., Peled, D.: Synthesis of parametric programs using genetic programming and model checking. In: Clemente, L., Holik, L. (eds.) Proceedings 15th International Workshop on Verification of Infinite-State Systems, vol. 140, EPTCS, Hanoi, Vietnam, 14 October 2013, pp. 70–84 (2013). Invited talk

    Google Scholar 

  10. Warren, H.S.: Hacker’s Delight. Addison Wesley, Boston (2002)

    Google Scholar 

  11. McPhee, N.F., Ohs, B., Hutchison, T.: Semantic building blocks in genetic programming. In: O’Neill, M., Vanneschi, L., Gustafson, S., Esparcia Alcázar, A.I., Falco, I., Cioppa, A., Tarantino, E. (eds.) EuroGP 2008. LNCS, vol. 4971, pp. 134–145. Springer, Heidelberg (2008). doi:10.1007/978-3-540-78671-9_12

    Chapter  Google Scholar 

  12. Sarafopoulos, A.: Evolution of affine transformations and iterated function systems using hierarchical evolution strategy. In: Miller, J., Tomassini, M., Lanzi, P.L., Ryan, C., Tettamanzi, A.G.B., Langdon, W.B. (eds.) EuroGP 2001. LNCS, vol. 2038, pp. 176–191. Springer, Heidelberg (2001). doi:10.1007/3-540-45355-5_14

    Chapter  Google Scholar 

  13. Azad, R.M.A., Ryan, C.: A simple approach to lifetime learning in genetic programming based symbolic regression. Evolut. Comput. 22(2), 287–317 (2014)

    Article  Google Scholar 

  14. Pawlak, T.P., Wieloch, B., Krawiec, K.: Semantic backpropagation for designing search operators in genetic programming. IEEE Trans. Evol. Comput. 19(3), 326–340 (2015)

    Article  Google Scholar 

  15. Ffrancon, R., Schoenauer, M.: Memetic semantic genetic programming. In: Silva, S., Esparcia-Alcazar, A.I., Lopez-Ibanez, M., Mostaghim, S., Timmis, J., Zarges, C., Correia, L., Soule, T., Giacobini, M., Urbanowicz, R., Akimoto, Y., Glasmachers, T., Fernandez de Vega, F., Hoover, A., Larranaga, P., Soto, M., Cotta, C., Pereira, F.B., Handl, J., Koutnik, J., Gaspar-Cunha, A., Trautmann, H., Mouret, J.B., Risi, S., Costa, E., Schuetze, O., Krawiec, K., Moraglio, A., Miller, J.F., Widera, P., Cagnoni, S., Merelo, J., Hart, E., Trujillo, L., Kessentini, M., Ochoa, G., Chicano, F., Doerr, C. (eds.) GECCO 2015: Proceedings of the 2015 on Genetic and Evolutionary Computation Conference, Madrid, Spain, 11–15 July 2015, pp. 1023–1030. ACM (2015). GP Track best paper

    Google Scholar 

  16. Barrett, C., Fontaine, P., Tinelli, C.: The SMT-LIB standard: version 2.5. Technical report, Department of Computer Science, The University of Iowa (2015). www.SMT-LIB.org

  17. McDermott, J., White, D.R., Luke, S., Manzoni, L., Castelli, M., Vanneschi, L., Jaskowski, W., Krawiec, K., Harper, R., De Jong, K., O’Reilly, U.M.: Genetic programming needs better benchmarks. In: Soule, T., Auger, A., Moore, J., Pelta, D., Solnon, C., Preuss, M., Dorin, A., Ong, Y.S., Blum, C., Silva, D.L., Neumann, F., Yu, T., Ekart, A., Browne, W., Kovacs, T., Wong, M.L., Pizzuti, C., Rowe, J., Friedrich, T., Squillero, G., Bredeche, N., Smith, S.L., Motsinger-Reif, A., Lozano, J., Pelikan, M., Meyer-Nienberg, S., Igel, C., Hornby, G., Doursat, R., Gustafson, S., Olague, G., Yoo, S., Clark, J., Ochoa, G., Pappa, G., Lobo, F., Tauritz, D., Branke, J., Deb, K. (eds.) GECCO 2012: Proceedings of the Fourteenth International Conference on Genetic and Evolutionary Computation Conference, Philadelphia, Pennsylvania, USA, 7–11 July 2012, pp. 791–798. ACM (2012)

    Google Scholar 

  18. Krawiec, K.: Behavioral Program Synthesis with Genetic Programming. Studies in Computational Intelligence, vol. 618. Springer International Publishing, New York (2015)

    Google Scholar 

  19. Krawiec, K., Polewski, P.: Potential fitness for genetic programming. In: Ebner, M., Cattolico, M., van Hemert, J., Gustafson, S., Merkle, L.D., Moore, F.W., Congdon, C.B., Clack, C.D., Moore, F.W., Rand, W., Ficici, S.G., Riolo, R., Bacardit, J., Bernado-Mansilla, E., Butz, M.V., Smith, S.L., Cagnoni, S., Hauschild, M., Pelikan, M., Sastry, K. (eds.) GECCO 2008 Late-Breaking Papers, Atlanta, GA, USA, 12–16 July 2008, pp. 2175–2180. ACM (2008)

    Google Scholar 

Download references

Acknowledgments

This work was supported by grant 2014/15/B/ST6/05205 funded by the National Science Centre, Poland.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Iwo Błądek .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Błądek, I., Krawiec, K. (2017). Evolutionary Program Sketching. In: McDermott, J., Castelli, M., Sekanina, L., Haasdijk, E., García-Sánchez, P. (eds) Genetic Programming. EuroGP 2017. Lecture Notes in Computer Science(), vol 10196. Springer, Cham. https://doi.org/10.1007/978-3-319-55696-3_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-55696-3_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-55695-6

  • Online ISBN: 978-3-319-55696-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics