arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.10089cs.HC
收藏

CFlow: 支持大规模编程题中学生代码的语义流分析

CFlow: Supporting Semantic Flow Analysis of Students' Code in Programming Problems at Scale

Ashley Ge Zhang, Xiaohang Tang, Steve Oney, Yan Chen

AI总结:

针对大型编程课程教师难掌握全班解题模式的问题,本文提出CFlow系统,通过语义聚类等技术生成可导航的大规模代码可视化表示,实验证明其能大幅提升错误识别效率与模式回忆效果。

摘要:

计算机科学教育的高需求导致选课人数众多,许多入门课程都有数千名学生。在这类大型课程中,教师极难理解全班范围内的解题模式或问题,而这对改进教学、应对重要的教学挑战至关重要。本文提出了一种技术与系统CFlow,用于生成可理解、可导航的大规模代码表示。CFlow能够在类似单份代码样本的可视化界面中呈现数千份代码样本。CFlow通过以下方式生成可扩展的代码表示:(1)将具有相似语义目的的单个语句聚类;(2)以维持语句间语义关系的方式呈现聚类后的语句;(3)以直方图形式展示不同代码变体的正确性;(4)允许用户使用语义过滤器交互式浏览各类解法。借助多层视图设计,用户既可以浏览高层模式,也可以查看底层实现。这与现有工具形成对比:现有工具要么仅关注孤立语句(从而丢弃了这些语句的上下文),要么对整份代码样本进行聚类(这会导致聚类数量过多——例如,若存在n个代码特征且每个特征有m种实现,就可能产生m^n个聚类)。我们通过对比研究评估了CFlow的有效性,结果发现使用CFlow的参与者识别错误的时间仅为原来的一半,且在超过6000份提交中回忆起的预期模式数量是原来的两倍。

英文摘要:

The high demand for computer science education has led to high enrollments, with thousands of students in many introductory courses. In such large courses, it can be overwhelmingly difficult for instructors to understand class-wide problem-solving patterns or issues, which is crucial for improving instruction and addressing important pedagogical challenges. In this paper, we propose a technique and system, CFlow, for creating understandable and navigable representations of code at scale. CFlow is able to represent thousands of code samples in a visualization that resembles a single code sample. CFlow creates scalable code representations by (1) clustering individual statements with similar semantic purposes, (2) presenting clustered statements in a way that maintains semantic relationships between statements, (3) representing the correctness of different variations as a histogram, and (4) allowing users to navigate through solutions interactively using semantic filters. With a multi-level view design, users can navigate high-level patterns, and low-level implementations. This is in contrast to prior tools that either limit their focus on isolated statements (and thus discard the surrounding context of those statements) or cluster entire code samples (which can lead to large numbers of clusters -- for example, if there are n code features and m implementations of each, there can be m^n clusters). We evaluated the effectiveness of CFlow with a comparison study, found participants using CFlow spent only half the time identifying mistakes and recalled twice as many desired patterns from over 6,000 submissions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑