The ability to comprehend code has long been recognized as an essential skill in software engineering. As programmers lean more heavily on generative artificial intelligence (GenAI) assistants to develop code solutions, it is becoming increasingly important for programmers to comprehend GenAI solutions so that they can verify their appropriateness and properly integrate them into existing code. At the same time, GenAI tools are increasingly being enlisted to provide programmers with tailored explanations of code written both by GenAI and humans. Thus, in computing education, GenAI presents new challenges and opportunities for learners who are trying to comprehend computer programs. To provide computing educators with evidence-based guidance on the use of GenAI to facilitate code comprehension and to identify directions for future research, we present a systematic literature review (SLR) of state-of-the-art approaches and tools that leverage GenAI to enhance code comprehension. Our SLR focuses on 31 studies published between 2022 and 2024. Despite their potential, GenAI assistants often yield inaccurate or unclear explanations, and novice programmers frequently struggle to craft effective prompts, thereby impeding their ability to leverage GenAI to aid code comprehension. Our review classifies GenAI-based approaches and tools, identifies methods used to study them, and summarizes the empirical evaluations of their effectiveness. We consider the implications of our findings for computing education research and practice, and identify directions for future research.
翻译:代码理解能力长期以来被公认为软件工程中的一项关键技能。随着程序员日益依赖生成式人工智能(GenAI)助手来开发代码解决方案,程序员理解GenAI生成的解决方案变得愈发重要,以便验证其适用性并将其正确集成到现有代码中。与此同时,GenAI工具正越来越多地被用于为程序员提供针对GenAI和人类编写代码的定制化解释。因此,在计算教育领域,GenAI为试图理解计算机程序的学习者带来了新的挑战与机遇。为向计算教育工作者提供基于证据的指导,促进利用GenAI辅助代码理解,并明确未来研究方向,我们对利用GenAI增强代码理解的前沿方法与工具进行了系统文献综述。本综述聚焦于2022年至2024年间发表的31项研究。尽管具有潜力,GenAI助手常产生不准确或模糊的解释,且新手程序员往往难以构建有效的提示,从而阻碍其利用GenAI辅助代码理解的能力。本综述对基于GenAI的方法与工具进行了分类,识别了相关研究方法,并总结了其有效性的实证评估结果。我们探讨了研究发现对计算教育研究与实践的启示,并指明了未来研究方向。