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

Python中Ad Hoc解析器的探索性研究

An Exploratory Study of Ad Hoc Parsers in Python

Michael Schröder, Marc Goritschnig, Jürgen Cito

AI总结:

本文通过大规模挖掘GitHub开源Python项目,利用程序切片和25个语法语义指标,围绕9个研究问题探索ad hoc解析器的特征,并通过聚类分析识别常见解析模式。

摘要:

背景:Ad hoc解析器是指使用split、trim或slice等常见字符串函数来有效执行解析的代码片段。无论是处理命令行参数、读取配置文件、解析自定义文件格式,还是执行任意数量的其他次要字符串处理任务,ad hoc解析无处不在——但人们对其了解甚少。目标:本研究旨在揭示现实世界Python项目中ad hoc解析代码的常见语法和语义特征。我们的目标是理解ad hoc解析器的本质,以便为未来该领域的程序分析工作提供参考。方法:我们计划基于对GitHub上开源Python仓库的大规模挖掘开展一项探索性研究。我们将使用程序切片来识别与ad hoc解析相关的程序片段,并通过25个初始语法和语义指标,围绕9个研究问题分析这些解析器及其周围上下文。除描述性统计外,我们还将尝试通过聚类分析来识别常见的解析模式。

英文摘要:

Background: Ad hoc parsers are pieces of code that use common string functions like split, trim, or slice to effectively perform parsing. Whether it is handling command-line arguments, reading configuration files, parsing custom file formats, or any number of other minor string processing tasks, ad hoc parsing is ubiquitous -- yet poorly understood. Objective: This study aims to reveal the common syntactic and semantic characteristics of ad hoc parsing code in real world Python projects. Our goal is to understand the nature of ad hoc parsers in order to inform future program analysis efforts in this area. Method: We plan to conduct an exploratory study based on large-scale mining of open-source Python repositories from GitHub. We will use program slicing to identify program fragments related to ad hoc parsing and analyze these parsers and their surrounding contexts across 9 research questions using 25 initial syntactic and semantic metrics. Beyond descriptive statistics, we will attempt to identify common parsing patterns by cluster analysis.

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

↑