arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1904.09818cs.SEcs.DCcs.HCcs.PL
收藏

一个DSL统治一切:IDE辅助的敏捷数据分析代码生成

One DSL to Rule Them All: IDE-Assisted Code Generation for Agile Data Analysis

Artur Andrzejak, Oliver Wenz, Diego Costa

摘要:

数据分析是科学研究的核心,研究人员和从业人员通常通过编写自己的自动化脚本集来完成这项重要任务。虽然设计数据分析管道的工具和语言并不短缺,但用户花费大量精力学习这些语言/工具的细节,并且通常设计的解决方案过于特定于项目,无法在未来的研究中重用。此外,用户需要进一步努力使他们的代码可伸缩,因为并行实现通常更复杂。我们通过提出一种先进的代码推荐工具来解决这些问题,该工具有助于开发数据科学脚本。用户用人类可读的领域特定语言(DSL)表达他们的意图,以进行框架操作和分析。DSL语句可以在编辑过程中转换为可执行的Python代码。为了避免学习DSL并提高用户友好性,我们的工具支持主流IDE和编辑器中的代码完成。此外,DSL语句可以为不同的数据分析框架生成可执行代码(目前我们支持Pandas和PySpark)。总的来说,我们的方法试图加速常见的数据分析任务的编程,并促进框架之间的实现转换。在基于流行的数据处理教程的初步评估中,我们的工具能够完全覆盖Pandas的14个处理步骤中的9个,PySpark的16个处理步骤中的10个,同时部分覆盖每个框架的4个处理步骤。

英文摘要:

Data analysis is at the core of scientific studies, a prominent task that researchers and practitioners typically undertake by programming their own set of automated scripts. While there is no shortage of tools and languages available for designing data analysis pipelines, users spend substantial effort in learning the specifics of such languages/tools and often design solutions too project specific to be reused in future studies. Furthermore, users need to put further effort into making their code scalable, as parallel implementations are typically more complex. We address these problems by proposing an advanced code recommendation tool which facilitates developing data science scripts. Users formulate their intentions in a human-readable Domain Specific Language (DSL) for dataframe manipulation and analysis. The DSL statements can be converted into executable Python code during editing. To avoid the need to learn the DSL and increase user-friendliness, our tool supports code completion in mainstream IDEs and editors. Moreover, DSL statements can generate executable code for different data analysis frameworks (currently we support Pandas and PySpark). Overall, our approach attempts to accelerate programming of common data analysis tasks and to facilitate the conversion of the implementations between frameworks. In a preliminary assessment based on a popular data processing tutorial, our tool was able to fully cover 9 out of 14 processing steps for Pandas and 10 out of 16 for PySpark, while partially covering 4 processing steps for each of the frameworks.

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

↑