Safe-DS:一种让数据科学变得安全的领域特定语言
Safe-DS: A Domain Specific Language to Make Data Science Safe
AI总结:
本文提出一种用于数据科学的领域特定语言Safe-DS,通过静态类型检查捕获常规及数据操作等错误,并集成Python库与图形表示,使DS开发更安全、高效且可靠。
摘要:
由于数据科学(DS)流水线运行时间较长,如果不能静态检测,即使是微小的编程错误也可能代价高昂。然而,即使是基本的DS流水线静态类型检查也很困难,因为大多数流水线是用Python编写的。Python中的静态类型检查只能通过外部linter实现。这些工具需要为函数的参数或结果提供静态类型注解,而许多DS库并不提供这些注解。在本文中,我们展示了如何通过Safe-DS——一种用于DS的领域特定语言(DSL)——以静态安全的方式使用丰富的Python DS库。Safe-DS能够捕获常规类型错误以及与范围限制、数据操作和函数调用顺序相关的错误,其能力远超当前的Python linter。Python库通过一种存根语言集成到Safe-DS中,该语言用于指定其声明的接口,以及一个API编辑器,能够从Python库的代码和文档中提取类型信息,并自动生成合适的存根。此外,Safe-DS为文本DS流水线补充了图形表示,通过防止语法错误来简化安全开发。文本和图形视图的无缝同步让开发者始终可以选择最适合其技能和当前任务的方式。我们认为Safe-DS能让DS开发更简单、更快速、更可靠,显著降低开发成本。
英文摘要:
Due to the long runtime of Data Science (DS) pipelines, even small programming mistakes can be very costly, if they are not detected statically. However, even basic static type checking of DS pipelines is difficult because most are written in Python. Static typing is available in Python only via external linters. These require static type annotations for parameters or results of functions, which many DS libraries do not provide. In this paper, we show how the wealth of Python DS libraries can be used in a statically safe way via Safe-DS, a domain specific language (DSL) for DS. Safe-DS catches conventional type errors plus errors related to range restrictions, data manipulation, and call order of functions, going well beyond the abilities of current Python linters. Python libraries are integrated into Safe-DS via a stub language for specifying the interface of its declarations, and an API-Editor that is able to extract type information from the code and documentation of Python libraries, and automatically generate suitable stubs. Moreover, Safe-DS complements textual DS pipelines with a graphical representation that eases safe development by preventing syntax errors. The seamless synchronization of textual and graphic view lets developers always choose the one best suited for their skills and current task. We think that Safe-DS can make DS development easier, faster, and more reliable, significantly reducing development costs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。