Assertion checking is an invaluable programmer's tool for finding many classes of errors or verifying their absence in dynamic languages such as Prolog. For Prolog programmers this means being able to have relevant properties such as modes, types, determinacy, non-failure, sharing, constraints, cost, etc., checked and errors flagged without having to actually run the program. Such global static analysis tools are arguably most useful the earlier they are used in the software development cycle, and fast response times are essential for interactive use. Triggering a full and precise semantic analysis of a software project every time a change is made can be prohibitively expensive. In our static analysis and verification framework this challenge is addressed through a combination of modular and incremental (context- and path-sensitive) analysis that is responsive to program edits, at different levels of granularity. We describe how the combination of this framework within an integrated development environment (IDE) takes advantage of such incrementality to achieve a high level of reactivity when reflecting analysis and verification results back as colorings and tooltips directly on the program text -- the tool's VeriFly mode. The concrete implementation that we describe is Emacs-based and reuses in part off-the-shelf "on-the-fly" syntax checking facilities (flycheck). We believe that similar extensions are also reproducible with low effort in other mature development environments. Our initial experience with the tool shows quite promising results, with low latency times that provide early, continuous, and precise assertion checking and other semantic feedback to programmers during the development process. The tool supports Prolog natively, as well as other languages by semantic transformation into Horn clauses. This paper is under consideration for acceptance in TPLP.
翻译:发音检查是一个非常宝贵的程序员工具, 用来查找许多类别的错误, 或核实它们没有使用像 Prolog 这样的动态语言。 对于 Prolog 程序员来说, 这意味着能够拥有相关属性, 如模式、 类型、 确定性、 非失败、 共享、 约束、 成本等, 检查并标出错误, 而不必实际运行程序。 这种全球静态分析工具在软件开发周期中使用的时间越早, 快速响应时间对于互动使用来说就最为有用 。 每次做出改变时, 对软件项目进行全面和精确的语义反馈分析可能代价太低。 在我们的静态分析和核查框架中, 这就意味着通过模块化和递增性( 对文本和路径敏感的)分析组合来应对这一挑战。 我们描述这个框架在综合开发环境( IDE) 中的组合是如何利用这种递增性来达到高的回流效果的。 当分析结果和核查结果被反射回溯到程序文本中时, 将工具的快速性分析结果和工具的直截面, 工具的初始性分析与预性分析模式中, 将具体的推算为我们之前的变换过程。 我们的进度的变换过程是用于其他的, 我们的变换的, 将演示中的系统中的系统, 以其他的顺序的顺序的顺序, 将演示过程, 以其他的周期性变式的变换的顺序, 我们的顺序的顺序中, 将显示中, 我们的顺序的计算中, 将显示的顺序的顺序的顺序的顺序是其他的顺序, 我们的变式的变式的演算。