Agile Construction of Data Science DSLs (Tool Demo)
Domain Specific Languages (DSLs) have proven useful in the domain of data science, as witnessed by the popularity of SQL, and emergence of DSLs like Trifacta Data Wrangler Language. However, implementing and maintaining a DSL incurs a significant effort which limits their utility in context of fast-changing data science frameworks and libraries.
We propose an approach and a Python-based library/tool NLDSL which simplifies and streamlines implementation of DSLs modeling pipelines of operations. NLDSL offers an “easy to use” interface to add new pipeline operations. In particular, syntax description and operation implementation are bundled together as annotated and terse Python functions, which simplifies extending and maintaining a DSL. To support ad hoc DSL elements, NLDSL offers a mechanism to define DSL-level functions which are then treated as first-class DSL elements.
Our tool automatically supports each DSL by code completions and in-editor documentation in a multitude of IDEs implementing the Microsoft’s Language Server Protocol. To circumvent the problem of a limited expressiveness of a external DSL, our tool allows embedding DSL statements in the source code comments of a general purpose language and to translate the DSL to such a language during editing.
We demonstrate and evaluate our approach and tool by implementing a DSL for data tables which is translated to either Pandas or to PySpark code. A preliminary evaluation shows that this DSL can be defined in a concise and maintainable way, and that it can cover a majority of processing steps of popular Spark/Pandas tutorials.
Mon 21 Oct
|11:00 - 11:30|
Shigeru ChibaGraduate School of Information Science and Technology, The University of Tokyo
|11:30 - 11:50|
|11:50 - 12:10|
|12:10 - 12:30|