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

动态语言的上下文敏感抽象解释

Context-Sensitive Abstract Interpretation of Dynamic Languages

Franciszek Piszcz

AI总结:

针对动态语言IDE工具因动态特性导致控制流/数据流识别失效的问题,提出基于抽象解释的静态分析算法,可分析动态元编程与反射,已实现支持JavaScript子集的原型分析器,弥合动静态语言工具差距。

摘要:

Java 等静态语言与 Python、JavaScript 等动态语言在 IDE 工具的质量上存在巨大差距。这些动态语言中的现代框架和库大量利用其动态特性,以实现最佳的易用性与可读性。这带来的副作用是,当前一代 IDE 无法识别控制流与数据流,常常导致导航、自动补全和重构功能失效。本论文提出了一种算法,通过对程序中的动态元编程和运行时反射进行静态分析,弥合动态语言与静态语言工具之间的这一差距。我们采用名为 abstract interpretation(抽象解释)的技术,对程序进行部分执行,提取通常仅在运行时才能获取的信息。我们的算法已在一个原型分析器中实现,可分析用 JavaScript 子集编写的程序。

英文摘要:

There is a vast gap in the quality of IDE tooling between static languages like Java and dynamic languages like Python or JavaScript. Modern frameworks and libraries in these languages heavily use their dynamic capabilities to achieve the best ergonomics and readability. This has a side effect of making the current generation of IDEs blind to control flow and data flow, which often breaks navigation, autocompletion and refactoring. In this thesis we propose an algorithm that can bridge this gap between tooling for dynamic and static languages by statically analyzing dynamic metaprogramming and runtime reflection in programs. We use a technique called abstract interpretation to partially execute programs and extract information that is usually only available at runtime. Our algorithm has been implemented in a prototype analyzer that can analyze programs written in a subset of JavaScript.

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

↑