Skip to main content

Grammatical Evolution Mapping for Semantically-Constrained Genetic Programming

  • Chapter
  • First Online:
Genetic Programming Theory and Practice XVIII

Part of the book series: Genetic and Evolutionary Computation ((GEVO))

  • 488 Accesses

Abstract

Search-Based Software Engineering problems frequently have semantic constraints that can be used to deterministically restrict what type of programs can be generated, improving the performance of Genetic Programming. Strongly-Typed and Grammar-Guided Genetic Programming are two examples of using domain-knowledge to improve performance of Genetic Programming by preventing solutions that are known to be invalid from ever being added to the population. However, the restrictions in real world challenges like program synthesis, automated program repair or test generation are more complex than what context-free grammars or simple types can express. We address these limitations with examples, and discuss the process of efficiently generating individuals in the context of Christiansen Grammatical Evolution and Refined-Typed Genetic Programming. We present three new approaches for the population initialization procedure of semantically constrained GP that are more efficient and promote more diversity than traditional Grammatical Evolution.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover 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

Institutional subscriptions

Notes

  1. 1.

    We use the term ‘probability’ loosely, not with a statistical meaning.

References

  1. Alhroob, A., Imam, A.T., Al-Heisa, R.: The use of artificial neural networks for extracting actions and actors from requirements document. Inf. Softw. Technol. 101, 1–15 (2018)

    Google Scholar 

  2. Bartoli, A., Lorenzo, A.D., Medvet, E., Squillero, G.: Multi-level diversity promotion strategies for grammar-guided genetic programming. Appl. Soft Comput. 83 (2019)

    Google Scholar 

  3. Binard, F., Felty, A.P.: Genetic programming with polymorphic types and higher-order functions. In: Ryan, C., Keijzer, M. (eds.) Genetic and Evolutionary Computation Conference, GECCO 2008, Proceedings, Atlanta, GA, USA, 12–16 July 2008, pp. 1187–1194. ACM (2008)

    Google Scholar 

  4. Bladek, I., Krawiec, K.: Evolutionary program sketching. In: McDermott, J., Castelli, M., Sekanina, L., Haasdijk, E., García-Sánchez, P. (eds.) Genetic Programming—20th European Conference, EuroGP 2017, Amsterdam, The Netherlands, 19–21 April 2017, Proceedings, Lecture Notes in Computer Science, vol. 10196, pp. 3–18 (2017)

    Google Scholar 

  5. Bojarczuk, C.C., Lopes, H.S., Freitas, A.A., Michalkiewicz, E.L.: A constrained-syntax genetic programming system for discovering classification rules: application to medical data sets. Artif. Intell. Med. 30(1), 27–48 (2004)

    Google Scholar 

  6. Durieux, T., Madeiral, F., Martinez, M., Abreu, R.: Empirical review of java program repair tools: a large-scale experiment on 2, 141 bugs and 23, 551 repair attempts. In: Dumas, M., Pfahl, D., Apel, S., Russo, A. (eds.) Proceedings of the ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/SIGSOFT FSE 2019, Tallinn, Estonia, 26–30 Aug 2019, pp. 302–313. ACM (2019)

    Google Scholar 

  7. Fonseca, A., Santos, P., Silva, S.: The usability argument for refinement typed genetic programming. In: Bäck, T., Preuss, M., Deutz, A.H., Wang, H., Doerr, C., Emmerich, M.T.M., Trautmann, H. (eds.) Parallel Problem Solving from Nature—PPSN XVI—16th International Conference, PPSN 2020, Leiden, The Netherlands, 5–9 Sept 2020, Proceedings, Part II, Lecture Notes in Computer Science, vol. 12270, pp. 18–32. Springer (2020)

    Google Scholar 

  8. Forstenlechner, S., Fagan, D., Nicolau, M., O’Neill, M.: Extending program synthesis grammars for grammar-guided genetic programming. In: Auger, A., Fonseca, C.M., Lourenço, N., Machado, P., Paquete, L., Whitley, L.D. (eds.) Parallel Problem Solving from Nature—PPSN XV—15th International Conference, Coimbra, Portugal, 8–12 Sept 2018, Proceedings, Part I, Lecture Notes in Computer Science, vol. 11101, pp. 197–208. Springer (2018)

    Google Scholar 

  9. Fraser, G., Arcuri, A.: Evosuite: automatic test suite generation for object-oriented software. In: Gyimóthy, T., Zeller, A. (eds.) SIGSOFT/FSE’11 19th ACM SIGSOFT Symposium on the Foundations of Software Engineering (FSE-19) and ESEC’11: 13th European Software Engineering Conference (ESEC-13), Szeged, Hungary, 5–9 Sept 2011, pp. 416–419. ACM (2011)

    Google Scholar 

  10. Galeotti, J.P., Fraser, G., Arcuri, A.: Extending a search-based test generator with adaptive dynamic symbolic execution. In: Pasareanu, C.S., Marinov, D. (eds.) International Symposium on Software Testing and Analysis, ISSTA ’14, San Jose, CA, USA—21–24 July 2014, pp. 421–424. ACM (2014)

    Google Scholar 

  11. Goues, C.L., Nguyen, T., Forrest, S., Weimer, W.: Genprog: a generic method for automatic software repair. IEEE Trans. Softw. Eng. 38(1), 54–72 (2012)

    Google Scholar 

  12. Griffith, D., Gunter, E.L.: Liquidpi: inferrable dependent session types. In: Brat, G., Rungta, N., Venet, A. (eds.) NASA Formal Methods, 5th International Symposium, NFM 2013, Moffett Field, CA, USA, 14–16 May 2013. Proceedings, Lecture Notes in Computer Science, vol. 7871, pp. 185–197. Springer (2013)

    Google Scholar 

  13. Guo, Z., James, M., Justo, D., Zhou, J., Wang, Z., Jhala, R., Polikarpova, N.: Program synthesis by type-guided abstraction refinement. Proc. ACM Program. Lang. 4(POPL), 12:1–12:28 (2020)

    Google Scholar 

  14. Jhala, R., Vazou, N.: Refinement types: a tutorial. CoRR (2020). https://arxiv.org/abs/2010.07763

  15. Kloos, J., Majumdar, R., Vafeiadis, V.: Asynchronous liquid separation types. In: Boyland, J.T. (ed.) 29th European Conference on Object-Oriented Programming, ECOOP 2015, 5–10 July 2015, Prague, Czech Republic, LIPIcs, vol. 37, pp. 396–420. Schloss Dagstuhl—Leibniz-Zentrum für Informatik (2015)

    Google Scholar 

  16. Knoth, T., Wang, D., Reynolds, A., Hoffmann, J., Polikarpova, N.: Liquid resource types. Proc. ACM Program. Lang. 4(ICFP), 106:1–106:29 (2020)

    Google Scholar 

  17. Kren, T., Moudrík, J., Neruda, R.: Combining top-down and bottom-up approaches for automated discovery of typed programs. In: 2017 IEEE Symposium Series on Computational Intelligence, SSCI 2017, Honolulu, HI, USA, Nov 27–Dec 1, 2017, pp. 1–8. IEEE (2017)

    Google Scholar 

  18. Liu, Y., Parker, J., Redmond, P., Kuper, L., Hicks, M., Vazou, N.: Verifying replicated data types with typeclass refinements in liquid haskell. Proc. ACM Program. Lang. 4(OOPSLA), 216:1–216:30 (2020)

    Google Scholar 

  19. Lourenço, N., Assunção, F., Pereira, F.B., Costa, E., Machado, P.: Structured grammatical evolution: a dynamic approach. In: Ryan, C., O’Neill, M., Collins, J.J. (eds.) Handbook of Grammatical Evolution, pp. 137–161. Springer (2018)

    Google Scholar 

  20. Lourenço, N., Pereira, F.B., Costa, E.: SGE: A structured representation for grammatical evolution. In: Bonnevay, S., Legrand, P., Monmarché, N., Lutton, E., Schoenauer, M. (eds.) Artificial Evolution—12th International Conference, Evolution Artificielle, EA 2015, Lyon, France, 26–28 Oct 2015. Revised Selected Papers, Lecture Notes in Computer Science, vol. 9554, pp. 136–148. Springer (2015)

    Google Scholar 

  21. Mégane, J., Lourenço, N., Machado, P.: Probabilistic grammatical evolution. In: Hu, T., Lourenço, N., Medvet, E. (eds.) Genetic Programming—24th European Conference, EuroGP 2021, Held as Part of EvoStar 2021, Virtual Event, 7–9 April 2021, Proceedings, Lecture Notes in Computer Science, vol. 12691, pp. 198–213. Springer (2021)

    Google Scholar 

  22. Meudec, C.: ATGen: automatic test data generation using constraint logic programming and symbolic execution. Softw. Test. Verif. Reliab. 11(2), 81–96 (2001)

    Google Scholar 

  23. de Miranda, P.B.C., Prudêncio, R.B.C.: Generation of particle swarm optimization algorithms: an experimental study using grammar-guided genetic programming. Appl. Soft Comput. 60, 281–296 (2017)

    Google Scholar 

  24. Montana, D.J.: Strongly typed genetic programming. Evol. Comput. 3(2), 199–230 (1995)

    Google Scholar 

  25. Nguyen, H.D.T., Qi, D., Roychoudhury, A., Chandra, S.: SemFix: program repair via semantic analysis. In: Notkin, D., Cheng, B.H.C., Pohl, K. (eds.) 35th International Conference on Software Engineering, ICSE ’13, San Francisco, CA, USA, 18–26 May 2013, pp. 772–781. IEEE Computer Society (2013)

    Google Scholar 

  26. Ortega, A., de la Cruz, M., Alfonseca, M.: Christiansen grammar evolution: grammatical evolution with semantics. IEEE Trans. Evol. Comput. 11(1), 77–90 (2007)

    Google Scholar 

  27. Poli, R., Langdon, W.B., McPhee, N.F.: A Field Guide to Genetic Programming. Lulu Enterprises, UK Ltd. (2008)

    Google Scholar 

  28. Polikarpova, N., Solar-Lezama, A.: Program synthesis from polymorphic refinement types. CoRR (2015). http://arxiv.org/abs/1510.08419

  29. Polikarpova, N., Stefan, D., Yang, J., Itzhaky, S., Hance, T., Solar-Lezama, A.: Liquid information flow control. Proc. ACM Program. Lang. 4(ICFP), 105:1–105:30 (2020)

    Google Scholar 

  30. Ramos-Criado, P., Rolanía, D.B., Manrique, D., Serrano, E.: Grammatically uniform population initialization for grammar-guided genetic programming. Soft Comput. 24(15), 11265–11282 (2020)

    Google Scholar 

  31. Rondon, P.M., Kawaguchi, M., Jhala, R.: Liquid types. In: Gupta, R., Amarasinghe, S.P. (eds.) Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation, Tucson, AZ, USA, 7–13 June 2008, pp. 159–169. ACM (2008)

    Google Scholar 

  32. Ryan, C., Collins, J.J., O’Neill, M.: Grammatical evolution: evolving programs for an arbitrary language. In: Banzhaf, W., Poli, R., Schoenauer, M., Fogarty, T.C. (eds.) Genetic Programming, First European Workshop, EuroGP’98, Paris, France, 14–15 April 1998, Proceedings, Lecture Notes in Computer Science, vol. 1391, pp. 83–96. Springer (1998)

    Google Scholar 

  33. Santos, P., Campos, J., Timperley, C.S., Fonseca, A.: Augmenting search-based techniques with static synthesis-based input generation. In: ICSE ’21: 42nd International Conference on Software Engineering, Workshops, Madrid, Spain, 17 May—4 June 2021. ACM (2021)

    Google Scholar 

  34. Sato, Y.: Specification-based test case generation with constrained genetic programming. In: 20th IEEE International Conference on Software Quality, Reliability and Security Companion, QRS Companion 2020, Macau, China, 11–14 Dec 2020, pp. 98–103. IEEE (2020)

    Google Scholar 

  35. Solar-Lezama, A.: The sketching approach to program synthesis. In: Hu, Z. (ed.) Programming Languages and Systems, 7th Asian Symposium, APLAS 2009, Seoul, Korea, 14–16 Dec 2009. Proceedings, Lecture Notes in Computer Science, vol. 5904, pp. 4–13. Springer (2009)

    Google Scholar 

  36. Spector, L., Robinson, A.J.: Genetic programming and autoconstructive evolution with the push programming language. Genet. Program. Evolvable Mach. 3(1), 7–40 (2002)

    MATH  Google Scholar 

  37. Vergilio, S.R., Pozo, A.T.R.: A grammar-guided genetic programming framework configured for data mining and software testing. Int. J. Softw. Eng. Knowl. Eng. 16(2), 245–268 (2006)

    Google Scholar 

  38. Wappler, S., Wegener, J.: Evolutionary unit testing of object-oriented software using strongly-typed genetic programming. In: Cattolico M. (ed.) Genetic and Evolutionary Computation Conference, GECCO 2006, Proceedings, Seattle, Washington, USA, 8–12 July 2006, pp. 1925–1932. ACM (2006)

    Google Scholar 

  39. Yuan, Y., Banzhaf, W.: ARJA: automated repair of java programs via multi-objective genetic programming. IEEE Trans. Softw. Eng. 46(10), 1040–1067 (2020)

    Google Scholar 

  40. Zhang, K., Shasha, D.E.: Simple fast algorithms for the editing distance between trees and related problems. SIAM J. Comput. 18(6), 1245–1262 (1989)

    MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

This work was supported by the Fundação para a Ciência e a Tecnologia (FCT) under LASIGE Research Unit (UIDB/00408/2020 and UIDP/00408/2020), the GADgET project (DSAIPA/DS/0022/2018) and the CMU Portugal project CAMELOT (POCI-01-0247-FEDER-045915).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alcides Fonseca .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Fonseca, A., Santos, P., Espada, G., Silva, S. (2022). Grammatical Evolution Mapping for Semantically-Constrained Genetic Programming. In: Banzhaf, W., Trujillo, L., Winkler, S., Worzel, B. (eds) Genetic Programming Theory and Practice XVIII. Genetic and Evolutionary Computation. Springer, Singapore. https://doi.org/10.1007/978-981-16-8113-4_3

Download citation

  • DOI: https://doi.org/10.1007/978-981-16-8113-4_3

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-16-8112-7

  • Online ISBN: 978-981-16-8113-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics