{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,8]],"date-time":"2026-10-08T11:36:39Z","timestamp":1791459399045,"version":"4.3.4"},"reference-count":49,"publisher":"Association for Computing Machinery (ACM)","issue":"FSE","license":[{"start":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T00:00:00Z","timestamp":1750291200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/publication-rights-and-licensing-policy"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Softw. Eng."],"published-print":{"date-parts":[[2025,6,19]]},"abstract":"<jats:p>Large Language Models (LLMs) were shown to struggle with long-term planning, which may be caused by the limited way in which they explore the space of possible solutions. We propose an architecture where a Reinforcement Learning (RL) Agent guides an LLM\u2019s space exploration: (1) the Agent has access to domainspecific information, and can therefore make decisions about the quality of candidate solutions based on specific and relevant metrics, which were not explicitly considered by the LLM\u2019s training objective; (2) the LLM can focus on generating immediate next steps, without the need for long-term planning. We allow non-linear reasoning by exploring alternative paths and backtracking. We evaluate this architecture on the program equivalence task, and compare it against Chain of Thought (CoT) and Tree of Thoughts (ToT). We assess both the downstream task, denoting the binary classification, and the intermediate reasoning steps. Our approach compares positively against CoT and ToT.<\/jats:p>","DOI":"10.1145\/3715761","type":"journal-article","created":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T11:15:34Z","timestamp":1750331734000},"page":"957-977","source":"Crossref","is-referenced-by-count":1,"title":["Integrating Large Language Models and Reinforcement Learning for Non-linear Reasoning"],"prefix":"10.1145","volume":"2","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-1432-3057","authenticated-orcid":false,"given":"Yoav","family":"Alon","sequence":"first","affiliation":[{"name":"University of Bristol, Bristol, United Kingdom"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9106-934X","authenticated-orcid":false,"given":"Cristina","family":"David","sequence":"additional","affiliation":[{"name":"University of Bristol, Bristol, United Kingdom"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,6,19]]},"reference":[{"key":"e_1_3_1_2_2","unstructured":"2024. Anthropic Claude 3. https:\/\/www.anthropic.com\/news\/claude-3-family"},{"key":"e_1_3_1_3_2","unstructured":"2024. Gemini. https:\/\/blog.google\/technology\/ai\/google-gemini-ai\/#sundar-note"},{"key":"e_1_3_1_4_2","doi-asserted-by":"publisher","DOI":"10.1145\/3540250.3549095"},{"key":"e_1_3_1_5_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2007.70725"},{"key":"e_1_3_1_6_2","doi-asserted-by":"publisher","DOI":"10.48550\/ARXIV.2303.12712"},{"key":"e_1_3_1_7_2","doi-asserted-by":"publisher","unstructured":"Ethan Caballero . OpenAI and llya Sutskever. 2016. Description2Code Dataset. https:\/\/doi.org\/10.5281\/zenodo.5665051 10.5281\/zenodo.5665051","DOI":"10.5281\/zenodo.5665051"},{"key":"e_1_3_1_8_2","doi-asserted-by":"publisher","unstructured":"Jonathan D. Chang Kiant\u00e9 Brantley Rajkumar Ramamurthy Dipendra Misra and Wen Sun. 2023. Learning to Generate Better Than Your LLM. CoRR abs\/2306.11816 (2023). https:\/\/doi.org\/10.48550\/ARXIV.2306.11816 10.48550\/ARXIV.2306.11816 arXiv:2306.11816","DOI":"10.48550\/ARXIV.2306.11816"},{"key":"e_1_3_1_9_2","doi-asserted-by":"publisher","unstructured":"Rudrajit Choudhuri Dylan Liu Igor Steinmacher Marco Gerosa and Anita Sarma. 2024. How Far Are We? The Triumphs and Trials of Generative AI in Learning Software Engineering. (2024). https:\/\/doi.org\/10.1145\/3597503.3639201 10.1145\/3597503.3639201","DOI":"10.1145\/3597503.3639201"},{"key":"e_1_3_1_10_2","unstructured":"Karl Cobbe Vineet Kosaraju Mohammad Bavarian Mark Chen Heewoo Jun Lukasz Kaiser Matthias Plappert Jerry Tworek Jacob Hilton Reiichiro Nakano Christopher Hesse and John Schulman. 2021. Training Verifiers to Solve Math Word Problems. CoRR abs\/2110.14168 (2021). arXiv:2110.14168 https:\/\/arxiv.org\/abs\/2110.14168"},{"key":"e_1_3_1_11_2","unstructured":"Shihan Dou Junjie Shan Haoxiang Jia Wenhao Deng Zhiheng Xi Wei He Yueming Wu Tao Gui Yang Liu and Xuanjing Huang. 2023. Towards Understanding the Capability of Large Language Models on Code Clone Detection: A Survey. arXiv:2308.01191 [cs.SE]"},{"key":"e_1_3_1_12_2","doi-asserted-by":"publisher","unstructured":"Hasan Ferit Eniser Hanliang Zhang Cristina David Meng Wang Maria Christakis Brandon Paulsen Joey Dodds and Daniel Kroening. 2024. Towards Translating Real-World Code with LLMs: A Study of Translating to Rust. CoRR abs\/2405.11514 (2024). https:\/\/doi.org\/10.48550\/ARXIV.2405.11514 10.48550\/ARXIV.2405.11514 arXiv:2405.11514","DOI":"10.48550\/ARXIV.2405.11514"},{"key":"e_1_3_1_13_2","doi-asserted-by":"publisher","DOI":"10.1002\/STVR.1472"},{"key":"e_1_3_1_14_2","doi-asserted-by":"publisher","unstructured":"Simeng Han Hailey Schoelkopf Yilun Zhao Zhenting Qi Martin Riddell Luke Benson Lucy Sun Ekaterina Zubova Yujie Qiao Matthew Burtell David Peng Jonathan Fan Yixin Liu Brian Wong Malcolm Sailor Ansong Ni Linyong Nan Jungo Kasai Tao Yu Rui Zhang Shafiq R. Joty Alexander R. Fabbri Wojciech Kryscinski Xi Victoria Lin Caiming Xiong and Dragomir Radev. 2022. FOLIO: Natural Language Reasoning with First-Order Logic. CoRR abs\/2209.00840 (2022). https:\/\/doi.org\/10.48550\/ARXIV.2209.00840 10.48550\/ARXIV.2209.00840 arXiv:2209.00840","DOI":"10.48550\/ARXIV.2209.00840"},{"key":"e_1_3_1_15_2","doi-asserted-by":"publisher","unstructured":"Kai Huang Zhengzi Xu Su Yang Hongyu Sun Xuejun Li Zheng Yan and Yuqing Zhang. 2023. A Survey on Automated Program Repair Techniques. CoRR abs\/2303.18184(2023). https:\/\/doi.org\/10.48550\/ARXIV.2303.18184arXiv:2303.18184 10.48550\/ARXIV.2303.18184arXiv:2303.18184","DOI":"10.48550\/ARXIV.2303.18184arXiv:2303.18184"},{"key":"e_1_3_1_16_2","doi-asserted-by":"publisher","unstructured":"Dave Hulbert. 2023. Using Tree-of-Thought Prompting to boost ChatGPT\u2019s reasoning. https:\/\/github.com\/dave1010\/tree-of-thought-prompting. https:\/\/doi.org\/10.5281\/ZENODO.10323452 10.5281\/ZENODO.10323452","DOI":"10.5281\/ZENODO.10323452"},{"key":"e_1_3_1_17_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-10936-7_11"},{"key":"e_1_3_1_18_2","doi-asserted-by":"publisher","unstructured":"Md Mahir Asef Kabir Sk Adnan Hassan Xiaoyin Wang Ying Wang Hai Yu and Na Meng. 2023. An empirical study of ChatGPT-3.5 on question answering and code maintenance. arXiv:2310.02104 [cs.SE] https:\/\/doi.org\/10.48550\/arXiv.2310.02104 10.48550\/arXiv.2310.02104","DOI":"10.48550\/arXiv.2310.02104"},{"key":"e_1_3_1_19_2","doi-asserted-by":"publisher","unstructured":"Ehud Karpas Omri Abend Yonatan Belinkov Barak Lenz Opher Lieber Nir Ratner Yoav Shoham Hofit Bata Yoav Levine Kevin Leyton-Brown Dor Muhlgay Noam Rozen Erez Schwartz Gal Shachaf Shai Shalev-Shwartz Amnon Shashua and Moshe Tennenholtz. 2022. MRKL Systems: A modular neuro-symbolic architecture that combines large language models external knowledge sources and discrete reasoning. CoRR abs\/2205.00445 (2022). https:\/\/doi.org\/10.48550\/ARXIV.2205.00445 10.48550\/ARXIV.2205.00445 arXiv:2205.00445","DOI":"10.48550\/ARXIV.2205.00445"},{"key":"e_1_3_1_20_2","unstructured":"Takeshi Kojima Shixiang Shane Gu Machel Reid Yutaka Matsuo and Yusuke Iwasawa. 2022. Large Language Models are Zero-Shot Reasoners. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022 NeurIPS 2022 New Orleans LA USA November 28 - December 9 2022 Sanmi Koyejo S. Mohamed A. Agarwal Danielle Belgrave K. Cho and A. Oh (Eds.). http:\/\/papers.nips.cc\/paper_files\/paper\/2022\/hash\/8bb0d291acd4acf06ef112099c16f326-Abstract-Conference.html"},{"key":"e_1_3_1_21_2","unstructured":"Steve Kommrusch Th\u00e9o Barollet and L Pouchet. 2020. Equivalence of Dataflow Graphs via Rewrite Rules Using a Graph-to-Sequence Neural Model. ArXiv abs\/2002.06799 (2020) null. https:\/\/www.semanticscholar.org\/paper\/8bd94d48eb7a2706391c6cbf11fddf8440099cf9"},{"key":"e_1_3_1_22_2","doi-asserted-by":"publisher","unstructured":"Steve Kommrusch Monperrus Martin and L Pouchet. 2021. Self-Supervised Learning to Prove Equivalence Between Straight-Line Programs via Rewrite Rules. IEEE Transactions on Software Engineering null (2021) null. https:\/\/doi.org\/10.1109\/tse.2023.3271065 10.1109\/tse.2023.3271065","DOI":"10.1109\/tse.2023.3271065"},{"key":"e_1_3_1_23_2","unstructured":"Steven J Kommrusch Th\u00e9o Barollet and L Pouchet. 2021. Proving Equivalence Between Complex Expressions Using Graph-to-Sequence Neural Models. ArXiv abs\/2106.02452 (2021) null. https:\/\/www.semanticscholar.org\/paper\/6437aab9075d2a06d277146db10b4f4135432212"},{"key":"e_1_3_1_24_2","doi-asserted-by":"publisher","DOI":"10.1016\/0164-1212(90)90094-3"},{"key":"e_1_3_1_25_2","doi-asserted-by":"publisher","DOI":"10.4230\/DAGREP.8.4.1"},{"key":"e_1_3_1_26_2","unstructured":"Hung Le Yue Wang Akhilesh Deepak Gotmare Silvio Savarese and Steven Chu-Hong Hoi. 2022. CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022 NeurIPS 2022 New Orleans LA USA November 28 - December 9 2022 Sanmi Koyejo S. Mohamed A. Agarwal Danielle Belgrave K. Cho and A. Oh (Eds.). http:\/\/papers.nips.cc\/paper_files\/paper\/2022\/hash\/8636419dea1aa9fbd25fc4248e702da4-Abstract-Conference.html"},{"key":"e_1_3_1_27_2","unstructured":"Hung Le Yue Wang Akhilesh Deepak Gotmare Silvio Savarese and Steven C. H. Hoi. 2022. CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning. arXiv:2207.01780 [cs.LG]"},{"key":"e_1_3_1_28_2","doi-asserted-by":"publisher","DOI":"10.1016\/J.JSS.2021.111141"},{"key":"e_1_3_1_29_2","doi-asserted-by":"publisher","unstructured":"Bo Liu Yuqian Jiang Xiaohan Zhang Qiang Liu Shiqi Zhang Joydeep Biswas and Peter Stone. 2023. LLM+P: Empowering Large Language Models with Optimal Planning Proficiency. CoRR abs\/2304.11477 (2023). https:\/\/doi.org\/10.48550\/ARXIV.2304.11477 10.48550\/ARXIV.2304.11477 arXiv:2304.11477","DOI":"10.48550\/ARXIV.2304.11477"},{"key":"e_1_3_1_30_2","doi-asserted-by":"publisher","unstructured":"Changshu Liu Shizhuo Dylan Zhang and Reyhaneh Jabbarvand. 2024. CodeMind: A Framework to Challenge Large Language Models for Code Reasoning. CoRR abs\/2402.09664 (2024). https:\/\/doi.org\/10.48550\/ARXIV.2402.09664 10.48550\/ARXIV.2402.09664 arXiv:2402.09664","DOI":"10.48550\/ARXIV.2402.09664"},{"key":"e_1_3_1_31_2","doi-asserted-by":"publisher","unstructured":"Jieyi Long. 2023. Large Language Model Guided Tree-of-Thought. CoRR abs\/2305.08291 (2023). https:\/\/doi.org\/10.48550\/ARXIV.2305.08291 10.48550\/ARXIV.2305.08291 arXiv:2305.08291","DOI":"10.48550\/ARXIV.2305.08291"},{"key":"e_1_3_1_32_2","unstructured":"OpenAI : Josh Achiam Steven Adler Sandhini Agarwal Lama Ahmad Ilge Akkaya Florencia Leoni Aleman Diogo Almeida Janko Altenschmidt Sam Altman Shyamal Anadkat Red Avila Igor Babuschkin Suchir Balaji Valerie Balcom Paul Baltescu Haiming Bao Mo Bavarian Jeff Belgum Irwan Bello Jake Berdine et al. 2023. GPT-4 Technical Report. arXiv:2303.08774 [cs.CL]"},{"key":"e_1_3_1_33_2","unstructured":"Rangeet Pan Ali Reza Ibrahimzada Rahul Krishna Divya Sankar Lambert Pougeum Wassi Michele Merler Boris Sobolev Raju Pavuluri Saurabh Sinha and Reyhaneh Jabbarvand. 2024. Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code. (2024)."},{"key":"e_1_3_1_34_2","doi-asserted-by":"publisher","DOI":"10.3115\/1073083.1073135"},{"key":"e_1_3_1_35_2","doi-asserted-by":"publisher","DOI":"10.3115\/1073083.1073135"},{"key":"e_1_3_1_36_2","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-45699-6_8"},{"key":"e_1_3_1_37_2","doi-asserted-by":"crossref","unstructured":"Henrijs Princis Cristina David and Alan Mycroft. 2025. Enhancing SQL Query Generation with Neurosymbolic Reasoning. In The 39th Annual AAAI Conference on Artificial Intelligence. https:\/\/openreview.net\/forum?id=sbHQu2EPsm","DOI":"10.1609\/aaai.v39i19.34198"},{"key":"e_1_3_1_38_2","doi-asserted-by":"publisher","DOI":"10.5555\/3312046"},{"key":"e_1_3_1_39_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2009.02.007"},{"key":"e_1_3_1_40_2","volume-title":"The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023","author":"Saparov Abulhair","year":"2023","unstructured":"Abulhair Saparov and He He. 2023. Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-Thought. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net. https:\/\/openreview.net\/pdf?id=qFVVBzXxR2V"},{"key":"e_1_3_1_41_2","doi-asserted-by":"publisher","unstructured":"Imanol Schlag Sainbayar Sukhbaatar Asli Celikyilmaz Wen-tau Yih Jason Weston J\u00fcrgen Schmidhuber and Xian Li. 2023. Large Language Model Programs. CoRR abs\/2305.05364 (2023). https:\/\/doi.org\/10.48550\/ARXIV.2305.05364 10.48550\/ARXIV.2305.05364 arXiv:2305.05364","DOI":"10.48550\/ARXIV.2305.05364"},{"key":"e_1_3_1_42_2","doi-asserted-by":"crossref","unstructured":"Kimya Khakzad Shahandashti Mithila Sivakumar Mohammad Mahdi Mohajer Alvine B. Belle Song Wang and Timothy C. Lethbridge. 2024. Evaluating the Effectiveness of GPT-4 Turbo in Creating Defeaters for Assurance Cases. arXiv:2401.17991 [cs.SE]","DOI":"10.1145\/3650105.3652291"},{"key":"e_1_3_1_43_2","doi-asserted-by":"crossref","first-page":"347","DOI":"10.1007\/978-981-15-7533-4_27","volume-title":"Proceedings of the International Conference on Paradigms of Computing, Communication and Data Sciences","author":"Singh Utkarsh","year":"2021","unstructured":"Utkarsh Singh, Kuldeep Kumar, and DeepakKumar Gupta. 2021. A Study of Code Clone Detection Techniques in Software Systems. In Proceedings of the International Conference on Paradigms of Computing, Communication and Data Sciences, Mayank Dave, Ritu Garg, Mohit Dua, and Jemal Hussien (Eds.). Springer Singapore, Singapore, 347\u2013359."},{"key":"e_1_3_1_44_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2015.7332459"},{"issue":"3","key":"e_1_3_1_45_2","article-title":"Analysis of Sudoku Solving Algorithms","volume":"9","author":"Thenmozhi M.","year":"2017","unstructured":"M. Thenmozhi, Palash Jain, Sai Anand R, and Saketh Ram B. 2017. Analysis of Sudoku Solving Algorithms. International Journal of Engineering and Technology 9, 3 (2017). https:\/\/www.enggjournals.com\/ijet\/docs\/IJET17-09-03-043.pdf","journal-title":"International Journal of Engineering and Technology"},{"key":"e_1_3_1_46_2","unstructured":"Petar Veli\u010dkovi\u0107 Guillem Cucurull Arantxa Casanova Adriana Romero Pietro Li\u00f2 and Yoshua Bengio. 2018. Graph Attention Networks. arXiv:1710.10903 [stat.ML]"},{"key":"e_1_3_1_47_2","unstructured":"Jason Wei Xuezhi Wang Dale Schuurmans Maarten Bosma Brian Ichter Fei Xia Ed H. Chi Quoc V. Le and Denny Zhou. 2022. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022 NeurIPS 2022 New Orleans LA USA November 28 - December 9 2022 Sanmi Koyejo S. Mohamed A. Agarwal Danielle Belgrave K. Cho and A. Oh (Eds.). http:\/\/papers.nips.cc\/paper_files\/paper\/2022\/hash\/9d5609613524ecf4f15af0f7b31abca4-Abstract-Conference.html"},{"key":"e_1_3_1_48_2","unstructured":"Shunyu Yao Dian Yu Jeffrey Zhao Izhak Shafran Tom Griffiths Yuan Cao and Karthik Narasimhan. 2023. Tree of Thoughts: Deliberate Problem Solving with Large Language Models. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023 NeurIPS 2023 New Orleans LA USA December 10 - 16 2023 Alice Oh Tristan Naumann Amir Globerson Kate Saenko Moritz Hardt and Sergey Levine (Eds.). http:\/\/papers.nips.cc\/paper_files\/paper\/2023\/hash\/271db9922b8d1f4dd7aaef84ed5ac703-Abstract-Conference.html"},{"key":"e_1_3_1_49_2","doi-asserted-by":"crossref","unstructured":"Morteza Zakeri-Nasrabadi Saeed Parsa Mohammad Ramezani Chanchal Roy and Masoud Ekhtiarzadeh. 2023. A systematic literature review on source code similarity measurement and clone detection: techniques applications and challenges. arXiv:2306.16171 [cs.SE]","DOI":"10.1016\/j.jss.2023.111796"},{"key":"e_1_3_1_50_2","doi-asserted-by":"publisher","unstructured":"Hanliang Zhang Cristina David Meng Wang Brandon Paulsen and Daniel Kroening. 2024. Scalable Validated Code Translation of Entire Projects using Large Language Models. CoRR abs\/2412.08035 (2024). https:\/\/doi.org\/10.48550\/ARXIV.2412.08035 10.48550\/ARXIV.2412.08035 arXiv:2412.08035","DOI":"10.48550\/ARXIV.2412.08035"}],"container-title":["Proceedings of the ACM on Software Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3715761","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,8,23]],"date-time":"2026-08-23T11:03:07Z","timestamp":1787482987000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3715761"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,6,19]]},"references-count":49,"journal-issue":{"issue":"FSE","published-print":{"date-parts":[[2025,6,19]]}},"alternative-id":["10.1145\/3715761"],"URL":"https:\/\/doi.org\/10.1145\/3715761","relation":{},"ISSN":["2994-970X"],"issn-type":[{"value":"2994-970X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,6,19]]}}}