RunEx: Augmenting Regular-Expression Code Search with Runtime Values

RunEx: Augmenting Regular-Expression Code Search with Runtime Values
复制标题

DOI:
10.1109/vl-hcc57772.2023.00024
复制
发表时间:
2023-10
期刊:
2023 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)
影响因子:
--
通讯作者:
A. Zhang;Yan Chen;Steve Oney
A. Zhang;Yan Chen;Steve Oney
中科院分区:
其他
文献类型:
--
作者:
A. Zhang;Yan Chen;Steve Oney

文献摘要

相似文献

编程教师经常使用课堂练习来帮助学生巩固在讲座中学到的概念。然而,识别整个班级的模式和学生代码中的错误可能具有挑战性,特别是对于大型班级。常规的代码搜索工具不足以用于此目的,因为它们不是被设计用于寻找大的学生代码语料库下的语义结构,其中代码样本是相似的,相对较小的,并且由新手程序员编写。为了解决这个问题,我们引入RunEx,一种新的代码搜索工具,教师可以毫不费力地生成查询代码搜索的最小先验知识和快速搜索通过一个大的代码语料库。该工具由两部分组成:1)语法,它使用运行时值来增强正则表达式; 2)用户界面,它使教师能够构建具有高表达能力的基于运行时和语法的查询,并将组合过滤器应用于代码示例。我们的比较实验表明,RunEx优于基线系统与文本匹配单独识别代码模式具有更高的准确性。此外,RunEx还提供了一个用户界面,只需最少的先验知识即可创建搜索查询。通过大规模搜索和分析学生的代码与运行时值,我们的工作引入了一个新的范式,在编程教育中理解模式和错误。
Programming instructors frequently use in-class exercises to help students reinforce concepts learned in lecture. However, identifying class-wide patterns and mistakes in students' code can be challenging, especially for large classes. Conventional code search tools are insufficient for this purpose as they are not designed for finding semantic structures underlying large students' code corpus, where the code samples are similar, relatively small, and written by novice programmers. To address this limitation, we introduce RunEx, a novel code search tool where instructors can effortlessly generate queries with minimal prior knowledge of code search and rapidly search through a large code corpus. The tool consists of two parts: 1) a syntax that augments regular expressions with runtime values, and 2) a user interface that enables instructors to construct runtime and syntax-based queries with high expressiveness and apply combined filters to code examples. Our comparison experiment shows that RunEx outperforms baseline systems with text matching alone in identifying code patterns with higher accuracy. Furthermore, RunEx features a user interface that requires minimal prior knowledge to create search queries. Through searching and analyzing students' code with runtime values at scale, our work introduces a new paradigm for understanding patterns and errors in programming education.