Concurrent programming is a core component of Computer Science curricula, yet remains notoriously difficult for students to master due to its inherent complexity and the nondeterministic nature of concurrency bugs such as deadlocks and race conditions. In this work, we present ParaView, an educational tool designed to help students understand, debug, and correct concurrency issues in parallel programs written in C/C++. ParaView provides transparent execution recording and visualization to make parallel execution observable and comprehensible. We evaluated ParaView through a series of debugging and implementation tasks, with 17 students participating. Results showed a significant improvement in debugging and implementation successes compared to previous course iterations. A student survey confirmed that most participants found ParaView helpful. To further support learning outside the classroom, we explored using Large Language Models (LLMs) to analyze concurrency bugs and suggest fixes. While LLMs were highly effective in identifying bugs and explaining execution traces, the correctness of their bug fixes varied, especially for more complex synchronization patterns. Our findings suggest that recording-visualization tools like ParaView, complemented by artificial intelligence (AI), can improve teaching and learning of concurrent programming.
翻译:并发编程是计算机科学课程的核心组成部分,但由于其固有的复杂性以及死锁、竞态条件等并发错误的不确定性,学生掌握起来仍颇为困难。本研究提出ParaView这一教育工具,旨在帮助学生理解、调试并纠正C/C++并行程序中的并发问题。ParaView提供透明的执行记录与可视化功能,使并行执行过程可观察且可理解。我们通过一系列调试与实现任务对ParaView进行了评估,共有17名学生参与。结果显示,与先前课程迭代相比,学生调试与实现任务的成功率显著提升。学生调查确认,多数参与者认为ParaView具有实用性。为支持课外学习,我们进一步探索利用大语言模型(LLMs)分析并发错误并提出修复建议。研究发现,LLMs在错误识别及执行轨迹解释方面表现出色,但其错误修复的正确性存在差异,尤其在处理复杂同步模式时。本研究结果表明,配备人工智能(AI)辅助的记录-可视化工具(如ParaView)能够改善并发编程的教学效果。