{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,18]],"date-time":"2026-10-18T11:47:49Z","timestamp":1792324069728,"version":"4.4.0"},"publisher-location":"New York, NY, USA","reference-count":46,"publisher":"ACM","license":[{"start":{"date-parts":[[2026,10,7]],"date-time":"2026-10-07T00:00:00Z","timestamp":1791331200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"}],"funder":[{"name":"NFRF","award":["NFRFE-2024-00612"],"award-info":[{"award-number":["NFRFE-2024-00612"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":[],"published-print":{"date-parts":[[2026,10,7]]},"DOI":"10.1145\/3832783.3834385","type":"proceedings-article","created":{"date-parts":[[2026,10,7]],"date-time":"2026-10-07T22:18:46Z","timestamp":1791411526000},"page":"687-699","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["Think Before You Code: Dual Reasoning for the NLSafety\u2013Utility Trade-Off in LLM Code Generation"],"prefix":"10.1145","author":[{"ORCID":"https:\/\/orcid.org\/0009-0000-8862-8254","authenticated-orcid":false,"given":"Honghao","family":"Tan","sequence":"first","affiliation":[{"name":"Concordia University, Montreal, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0008-2907-3648","authenticated-orcid":false,"given":"Haibo","family":"Wang","sequence":"additional","affiliation":[{"name":"Concordia University, Montreal, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8633-3372","authenticated-orcid":false,"given":"Shin Hwei","family":"Tan","sequence":"additional","affiliation":[{"name":"Concordia University, Montreal, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,10,7]]},"reference":[{"key":"e_1_3_2_1_1_1","unstructured":"[n. d.]. Ollama Platform. https:\/\/ollama.com\/search?q=code"},{"key":"e_1_3_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3729380"},{"key":"e_1_3_2_1_3_1","doi-asserted-by":"publisher","unstructured":"Jacob Austin Augustus Odena Maxwell Nye Maarten Bosma Henryk Michalewski David Dohan Ellen Jiang Carrie Cai Michael Terry Quoc Le et al. 2021. Program synthesis with large language models. arXiv preprint arXiv:2108.07732 (2021). doi:10.48550\/arXiv.2108.07732 10.48550\/arXiv.2108.07732","DOI":"10.48550\/arXiv.2108.07732"},{"key":"e_1_3_2_1_4_1","unstructured":"Yuntao Bai Andy Jones Kamal Ndousse Amanda Askell Anna Chen Nova DasSarma Dawn Drain Stanislav Fort Deep Ganguli Tom Henighan et al. 2022. Training a helpful and harmless assistant with reinforcement learning from human feedback. arXiv preprint arXiv:2204.05862 (2022)."},{"key":"e_1_3_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.alw-1.16"},{"key":"e_1_3_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/3377816.3381720"},{"key":"e_1_3_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2023.3267446"},{"key":"e_1_3_2_1_8_1","unstructured":"Mark Chen Jerry Tworek Heewoo Jun Qiming Yuan Henrique Ponde de Oliveira Pinto Jared Kaplan Harri Edwards Yuri Burda Nicholas Joseph Greg Brockman Alex Ray Raul Puri Gretchen Krueger Michael Petrov Heidy Khlaaf Girish Sastry Pamela Mishkin Brooke Chan Scott Gray Nick Ryder Mikhail Pavlov Alethea Power Lukasz Kaiser Mohammad Bavarian Clemens Winter Philippe Tillet Felipe Petroski Such Dave Cummings Matthias Plappert Fotios Chantzis Elizabeth Barnes Ariel Herbert-Voss William Hebgen Guss Alex Nichol Alex Paino Nikolas Tezak Jie Tang Igor Babuschkin Suchir Balaji Shantanu Jain William Saunders Christopher Hesse Andrew N. Carr Jan Leike Josh Achiam Vedant Misra Evan Morikawa Alec Radford Matthew Knight Miles Brundage Mira Murati Katie Mayer Peter Welinder Bob McGrew Dario Amodei Sam McCandlish Ilya Sutskever and Wojciech Zaremba. 2021. Evaluating Large Language Models Trained on Code. (2021). arXiv:2107.03374 [cs.LG]"},{"key":"e_1_3_2_1_9_1","volume-title":"The Twelfth International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=TyFrPOKYXw","author":"Dai Josef","year":"2024","unstructured":"Josef Dai, Xuehai Pan, Ruiyang Sun, Jiaming Ji, Xinbo Xu, Mickel Liu, Yizhou Wang, and Yaodong Yang. 2024. Safe RLHF: Safe Reinforcement Learning from Human Feedback. In The Twelfth International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=TyFrPOKYXw"},{"key":"e_1_3_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICASSP49660.2025.10887899"},{"key":"e_1_3_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00128"},{"key":"e_1_3_2_1_12_1","doi-asserted-by":"crossref","unstructured":"Melody Y Guan Manas Joglekar Eric Wallace Saachi Jain Boaz Barak Alec Helyar Rachel Dias Andrea Vallone Hongyu Ren Jason Wei et al. 2024. Deliberative alignment: Reasoning enables safer language models. arXiv preprint arXiv:2412.16339 (2024).","DOI":"10.70777\/si.v2i3.15159"},{"key":"e_1_3_2_1_13_1","unstructured":"Daya Guo Qihao Zhu Dejian Yang Zhenda Xie Kai Dong Wentao Zhang Guanting Chen Xiao Bi Yifan Wu YK Li et al. 2024. DeepSeek-Coder: when the large language model meets programming\u2013the rise of code intelligence. arXiv preprint arXiv:2401.14196 (2024)."},{"key":"e_1_3_2_1_14_1","volume-title":"A simple sequentially rejective multiple test procedure. Scandinavian journal of statistics","author":"Holm Sture","year":"1979","unstructured":"Sture Holm. 1979. A simple sequentially rejective multiple test procedure. Scandinavian journal of statistics (1979), 65\u201370."},{"key":"e_1_3_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.52202\/085713-3331"},{"key":"e_1_3_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2025.findings-acl.1197"},{"key":"e_1_3_2_1_17_1","unstructured":"Daniel Kahneman. 2011. Thinking fast and slow. macmillan."},{"key":"e_1_3_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.52202\/068431-1613"},{"key":"e_1_3_2_1_19_1","first-page":"19","article-title":"Linux 6.19 Drops the Kernel\u2019s \u201cGenocide","volume":"6","author":"Larabel Michael","year":"2025","unstructured":"Michael Larabel. 2025. Linux 6.19 Drops the Kernel\u2019s \u201cGenocide\u201d Function. Phoronix. https:\/\/www.phoronix.com\/news\/Linux- 6.19- Drops- Genocide","journal-title":"Function. Phoronix. https:\/\/www.phoronix.com\/news\/Linux-"},{"key":"e_1_3_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2024.findings-"},{"key":"e_1_3_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.52202\/075280-"},{"key":"e_1_3_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.52202\/075280-"},{"key":"e_1_3_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2025.findings-acl.339"},{"key":"e_1_3_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.52202\/075280-"},{"key":"e_1_3_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF02295996"},{"key":"e_1_3_2_1_26_1","unstructured":"OpenAI. [n. d.]. OpenAI API Documentation. https:\/\/platform.openai.com\/docs\/overview"},{"key":"e_1_3_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.52202\/068431-2011"},{"key":"e_1_3_2_1_28_1","volume-title":"The Twelfth International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=hTEGyKf0dZ","author":"Qi Xiangyu","year":"2024","unstructured":"Xiangyu Qi, Yi Zeng, Tinghao Xie, Pin-Yu Chen, Ruoxi Jia, Prateek Mittal, and Peter Henderson. 2024. Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!. In The Twelfth International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=hTEGyKf0dZ"},{"key":"e_1_3_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2024.findings-acl.679"},{"key":"e_1_3_2_1_30_1","volume-title":"Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, et al.","author":"Roziere Baptiste","year":"2023","unstructured":"Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, et al. 2023. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950 (2023)."},{"key":"e_1_3_2_1_31_1","volume-title":"Synergy-of-thoughts: Eliciting efficient reasoning in hybrid language models. arXiv preprint arXiv:2402.02563","author":"Shang Yu","year":"2024","unstructured":"Yu Shang, Yu Li, Fengli Xu, and Yong Li. 2024. Synergy-of-thoughts: Eliciting efficient reasoning in hybrid language models. arXiv preprint arXiv:2402.02563 (2024)."},{"key":"e_1_3_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1109\/ASE63991.2025.00086"},{"key":"e_1_3_2_1_33_1","doi-asserted-by":"publisher","unstructured":"Honghao Tan Haibo Wang and Shin Hwei Tan. 2026. Artifact for Think Before You Code: Dual Reasoning for the NLSafety-Utility Trade-off in LLM Code Generation. doi:10.5281\/zenodo.19245736 10.5281\/zenodo.19245736","DOI":"10.5281\/zenodo.19245736"},{"key":"e_1_3_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1201\/9780429246593"},{"key":"e_1_3_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3611643.3616310"},{"key":"e_1_3_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2023.acl-"},{"key":"e_1_3_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00200"},{"key":"e_1_3_2_1_38_1","volume-title":"Self-Consistency Improves Chain of Thought Reasoning in Language Models. In The Eleventh International Conference on Learning Representations. https:\/\/openreview.net\/forum? id=1PL1NIMMrw","author":"Wang Xuezhi","year":"2023","unstructured":"Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V Le, Ed H. Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. 2023. Self-Consistency Improves Chain of Thought Reasoning in Language Models. In The Eleventh International Conference on Learning Representations. https:\/\/openreview.net\/forum? id=1PL1NIMMrw"},{"key":"e_1_3_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.52202\/068431-"},{"key":"e_1_3_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.2307\/3001968"},{"key":"e_1_3_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/3744916.3773192"},{"key":"e_1_3_2_1_42_1","volume-title":"OASIS: Open Agent Social Interaction Simulations with One Million Agents. arXiv:2411.11581 [cs.CL] https:\/\/arxiv.org\/abs\/2411.11581","author":"Yang Ziyi","year":"2025","unstructured":"Ziyi Yang, Zaibin Zhang, Zirui Zheng, Yuxian Jiang, Ziyue Gan, Zhiyu Wang, Zijian Ling, Jinsong Chen, Martz Ma, Bowen Dong, Prateek Gupta, Shuyue Hu, Zhenfei Yin, Guohao Li, Xu Jia, Lijun Wang, Bernard Ghanem, Huchuan Lu, Chaochao Lu, Wanli Ouyang, Yu Qiao, Philip Torr, and Jing Shao. 2025. OASIS: Open Agent Social Interaction Simulations with One Million Agents. arXiv:2411.11581 [cs.CL] https:\/\/arxiv.org\/abs\/2411.11581"},{"key":"e_1_3_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.52202\/075280-"},{"key":"e_1_3_2_1_44_1","volume-title":"Proceedings of the 42nd International Conference on Machine Learning (Proceedings of Machine Learning Research","volume":"76777","author":"Zhang Yichi","year":"2025","unstructured":"Yichi Zhang, Siyuan Zhang, Yao Huang, Zeyu Xia, Zhengwei Fang, Xiao Yang, Ranjie Duan, Dong Yan, Yinpeng Dong, and Jun Zhu. 2025. STAIR: Improving Safety Alignment with Introspective Reasoning. In Proceedings of the 42nd International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 267), Aarti Singh, Maryam Fazel, Daniel Hsu, Simon Lacoste-Julien, Felix Berkenkamp, Tegan Maharaj, Kiri Wagstaff, and Jerry Zhu (Eds.). PMLR, 76754\u201376777. https:\/\/proceedings.mlr.press\/v267\/zhang25cx.html"},{"key":"e_1_3_2_1_45_1","volume-title":"Least-to-Most Prompting Enables Complex Reasoning in Large Language Models. In The Eleventh International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=WZH7099tgfM","author":"Zhou Denny","unstructured":"Denny Zhou, Nathanael Sch\u00e4rli, Le Hou, Jason Wei, Nathan Scales, Xuezhi Wang, Dale Schuurmans, Claire Cui, Olivier Bousquet, Quoc V Le, and Ed H. Chi. 2023. Least-to-Most Prompting Enables Complex Reasoning in Large Language Models. In The Eleventh International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=WZH7099tgfM"},{"key":"e_1_3_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2025.emnlp-"}],"event":{"name":"ASE '26: 41st IEEE\/ACM International Conference on Automated Software Engineering","location":"Munich Germany","acronym":"ASE '26","sponsor":["SIGSOFT ACM Special Interest Group on Software Engineering","SIGAI ACM Special Interest Group on Artificial Intelligence","IEEE CS"]},"container-title":["Proceedings of the 41st IEEE\/ACM International Conference on Automated Software Engineering"],"original-title":[],"link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3832783.3834385","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,10,18]],"date-time":"2026-10-18T11:20:31Z","timestamp":1792322431000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3832783.3834385"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,10,7]]},"references-count":46,"alternative-id":["10.1145\/3832783.3834385","10.1145\/3832783"],"URL":"https:\/\/doi.org\/10.1145\/3832783.3834385","relation":{},"subject":[],"published":{"date-parts":[[2026,10,7]]},"assertion":[{"value":"2026-10-07","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}