{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,17]],"date-time":"2026-07-17T10:19:21Z","timestamp":1784283561703,"version":"3.55.0"},"reference-count":32,"publisher":"Springer Science and Business Media LLC","issue":"2","license":[{"start":{"date-parts":[[2023,1,17]],"date-time":"2023-01-17T00:00:00Z","timestamp":1673913600000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2023,1,17]],"date-time":"2023-01-17T00:00:00Z","timestamp":1673913600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":["SN COMPUT. SCI."],"abstract":"<jats:title>Abstract<\/jats:title><jats:p>Code generation is a key technique for model-driven engineering (MDE) approaches of software construction. Code generation enables the synthesis of applications in executable programming languages from high-level specifications in UML or in a domain-specific language. Specialised code generation languages and tools have been defined; however, the task of manually constructing a code generator remains a substantial undertaking, requiring a high degree of expertise in both the source and target languages, and in the code generation language. In this paper, we apply novel symbolic machine learning techniques for learning tree-to-tree mappings of software syntax trees, to automate the development of code generators from source\u2013target example pairs. We evaluate the approach on several code generation tasks, and compare the approach to other code generator construction approaches. The results show that the approach can effectively automate the synthesis of code generators from examples, with relatively small manual effort required compared to existing code generation construction approaches. We also identified that it can be adapted to learn software abstraction and translation algorithms. The paper demonstrates that a symbolic machine learning approach can be applied to assist in the development of code generators and other tools manipulating software syntax trees.<\/jats:p>","DOI":"10.1007\/s42979-022-01573-4","type":"journal-article","created":{"date-parts":[[2023,1,17]],"date-time":"2023-01-17T13:04:06Z","timestamp":1673960646000},"update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":14,"title":["Code Generation by Example Using Symbolic Machine Learning"],"prefix":"10.1007","volume":"4","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-9706-1410","authenticated-orcid":false,"given":"Kevin","family":"Lano","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Qiaomu","family":"Xue","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"297","published-online":{"date-parts":[[2023,1,17]]},"reference":[{"key":"1573_CR1","doi-asserted-by":"crossref","unstructured":"Aggarwal K, Salameh M, Hindle A. Using machine translation for converting Python 2 to Python 3 code. PeerJ Preprints. 2015.","DOI":"10.7287\/peerj.preprints.1459v1"},{"key":"1573_CR2","first-page":"347","volume":"8","author":"Z Balogh","year":"2009","unstructured":"Balogh Z, Varro D. Model transformation by example using inductive logic programming. SoSyM. 2009;8:347\u201364.","journal-title":"SoSyM"},{"key":"1573_CR3","doi-asserted-by":"crossref","unstructured":"Burgueno L, Cabot J, Gerard S. An LSTM-based neural network architecture for model transformations. In: MODELS \u201919. pp. 294\u20139. 2019.","DOI":"10.1109\/MODELS.2019.00013"},{"key":"1573_CR4","unstructured":"Chen X, Liu C, Song D. Tree-to-tree neural networks for program translation. In: 32nd conference on neural information processing systems (NIPS 2018). 2018."},{"issue":"2","key":"1573_CR5","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1007\/s10515-021-00282-1","volume":"28","author":"M Derakhshandi","year":"2021","unstructured":"Derakhshandi M, Kolahdouz-Rahimi S, Troya J, Lano K. A model-driven framework for developing android-based classic multiplayer 2D board games. Autom Softw Eng. 2021;28(2):1\u201357.","journal-title":"Autom Softw Eng"},{"key":"1573_CR6","first-page":"345","volume":"2016","author":"A Desai","year":"2016","unstructured":"Desai A, Gulwani S, Hingorani V, Jain N, Karkare A, Marron M, Sailesh R, Roy S. Program synthesis using natural language. ICSE. 2016;2016:345\u201356.","journal-title":"ICSE"},{"key":"1573_CR7","unstructured":"Eclipse project, 2020. Eclipse UML2Java code generator. https:\/\/git.eclipse.org\/c\/umlgen\/. Accessed 18 Aug 2020."},{"key":"1573_CR8","unstructured":"Funk M, Nysen A, Lichter H. From UML to ANSI-C: an eclipse-based code generation framework, RWTH. 2007."},{"key":"1573_CR9","doi-asserted-by":"crossref","unstructured":"Greiner S, Buchmann T, Westfechtel B. Bidirectional transformations with QVT-R: a case study in round-trip engineering UML class models and Java source code. In: Modelsward 2016. INSTICC, SCITEPRESS; 2016. pp. 15\u201327.","DOI":"10.5220\/0005644700150027"},{"key":"1573_CR10","unstructured":"Gries D. Compiler construction for digital computers. Wiley, New York; 1971."},{"key":"1573_CR11","unstructured":"Gulwani S. Programming by Example, Microsoft Corp. 2016."},{"key":"1573_CR12","unstructured":"Guo D, et\u00a0al. GraphCodeBERT: pre-training code representations with dataflow. In: ICLR 2021, 2021."},{"key":"1573_CR13","doi-asserted-by":"crossref","unstructured":"Heitkotter H, Majchrzak T, Kuchen H. Cross-platform MDD of mobile applications with $$MD^2$$. In: SAC 2013. ACM Press; 2013. pp. 526\u201333.","DOI":"10.1145\/2480362.2480464"},{"key":"1573_CR14","doi-asserted-by":"publisher","first-page":"1735","DOI":"10.1162\/neco.1997.9.8.1735","volume":"9","author":"S Hochreiter","year":"1997","unstructured":"Hochreiter S, Schmidhuber J. Long short-term memory. Neural Comput. 1997;9:1735\u201380.","journal-title":"Neural Comput."},{"key":"1573_CR15","unstructured":"Kernighan B, Ritchie D. The C programming language. 2nd edn. Prentice Hall; 1988."},{"key":"1573_CR16","unstructured":"Lachaux M-A, Roziere B, Chanussot L, Lample G. Unsupervised translation of programming languages. 2020. arXiv:2006.03511v3."},{"key":"1573_CR17","unstructured":"Lano K. Using the code generator language CSTL. 2022. https:\/\/agilemde.co.uk\/cgrules.pdf."},{"key":"1573_CR18","doi-asserted-by":"crossref","unstructured":"Lano K. Program translation using Model-driven engineering. In: ICSE 2022 companion Proceedings, 2022. pp. 362\u201363.","DOI":"10.1109\/ICSE-Companion55297.2022.9793785"},{"key":"1573_CR19","unstructured":"Lano K, Fang S, Kolahdouz-Rahimi S. TL: an abstract specification language for bidirectional transformations. In: MoDeVVa 2020, MODELS 2020. 2020. pp. article 77, 1\u201310."},{"key":"1573_CR20","first-page":"1","volume":"2021","author":"K Lano","year":"2021","unstructured":"Lano K, Kolahdouz-Rahimi S, Alwakeel L. Synthesis of mobile applications using AgileUML. ISEC. 2021;2021:1\u201310.","journal-title":"ISEC"},{"issue":"2","key":"1573_CR21","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/3471907","volume":"31","author":"K Lano","year":"2021","unstructured":"Lano K, Kolahdouz-Rahimi S, Fang S. Model transformation development using automated requirements analysis, metamodel matching and transformation by-example. ACM TOSEM. 2021;31(2):1\u201371.","journal-title":"ACM TOSEM"},{"key":"1573_CR22","doi-asserted-by":"crossref","unstructured":"Lano K, Xue Q. Lightweight software language processing using antlr and cgtl. In: Proceedings of the 11th international conference on model-driven engineering and software development (MODELSWARD), 2023.","DOI":"10.5220\/0011623000003402"},{"key":"1573_CR23","doi-asserted-by":"crossref","unstructured":"Lano K, Yassipour-Tehrani S, Alfraihi H, Kolahdouz-Rahimi S. Translating from UML-RSDS OCL to ANSI C. In: OCL 2017, STAF 2017. 2017. pp. 317\u201330.","DOI":"10.1007\/978-3-319-74730-9_28"},{"key":"1573_CR24","unstructured":"Lano K, Xue Q. Agile specification of code generators for model-driven engineering. In: 2020 15th international conference on software engineering advances (ICSEA). 2020. pp. 9\u201315."},{"key":"1573_CR25","doi-asserted-by":"crossref","unstructured":"Lano K, Xue Q. Code generation by example. In: Proceedings of the 10th international conference on model-driven engineering and software development (MODELSWARD). 2022. pp. 84\u201392.","DOI":"10.5220\/0010973600003119"},{"key":"1573_CR26","doi-asserted-by":"publisher","first-page":"629","DOI":"10.1016\/0743-1066(94)90035-3","volume":"19\u201320","author":"S Muggleton","year":"1994","unstructured":"Muggleton S, de Raedt L. Inductive logic programming: theory and methods. J Logic Programm. 1994;19\u201320:629\u201379.","journal-title":"J. Logic Programm."},{"key":"1573_CR27","doi-asserted-by":"crossref","unstructured":"Nguyen AT, Nguyen TT, Nguyen TN. Divide-and-conquer approach for multi-phase statistical migration for source code. In: Proceedings of the 30th IEEE\/ACM international conference on automated software engineering, ASE \u201915. IEEE Press; 2015. pp. 585\u201396.","DOI":"10.1109\/ASE.2015.74"},{"key":"1573_CR28","unstructured":"OMG. Object constraint language (OCL) 2.4 specification. 2014."},{"key":"1573_CR29","unstructured":"Quinlan J. C4.5: programs for machine learning. Morgan Kaufmann; 1993."},{"key":"1573_CR30","unstructured":"Roziere B, Zhang J, Charton F, Harman M, Synnaeve G, Lample G. Leveraging automated unit tests for unsupervised code translation, 2021. CoRR, vol. abs\/2110.06773."},{"issue":"1","key":"1573_CR31","first-page":"35","volume":"17","author":"S Vaupel","year":"2018","unstructured":"Vaupel S, Taentzer G, Gerlach R, Guckert M. Model-driven development of mobile applications. Sosym. 2018;17(1):35\u201363.","journal-title":"Sosym"},{"key":"1573_CR32","first-page":"313","volume":"16","author":"J Whittle","year":"2017","unstructured":"Whittle J, Hutchinson J, Rouncefield M, Burden H, Heldal R. A taxonomy of tool-related issues affecting the adoption of MDE. Sosym. 2017;16:313\u201331.","journal-title":"Sosym"}],"container-title":["SN Computer Science"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s42979-022-01573-4.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/article\/10.1007\/s42979-022-01573-4\/fulltext.html","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s42979-022-01573-4.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2024,10,12]],"date-time":"2024-10-12T10:44:45Z","timestamp":1728729885000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/s42979-022-01573-4"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,1,17]]},"references-count":32,"journal-issue":{"issue":"2","published-online":{"date-parts":[[2023,3]]}},"alternative-id":["1573"],"URL":"https:\/\/doi.org\/10.1007\/s42979-022-01573-4","relation":{},"ISSN":["2661-8907"],"issn-type":[{"value":"2661-8907","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,1,17]]},"assertion":[{"value":"20 May 2022","order":1,"name":"received","label":"Received","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"16 December 2022","order":2,"name":"accepted","label":"Accepted","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"17 January 2023","order":3,"name":"first_online","label":"First Online","group":{"name":"ArticleHistory","label":"Article History"}},{"order":1,"name":"Ethics","group":{"name":"EthicsHeading","label":"Declarations"}},{"value":"Q. Xue was funded by the King\u2019s China Scholarship award. K. Lano declares that he has no conflict of interest. Q. Xue declares that she has no conflict of interest. This article does not contain any studies with human participants or animals performed by any of the authors.","order":2,"name":"Ethics","group":{"name":"EthicsHeading","label":"Conflict of interest"}}],"article-number":"170"}}