以图形方式理解和维护策略OR我们如何了解到一个图的价值可能超过1万LoC
Understanding and maintaining tactics graphically OR how we are learning that a diagram can be worth more than 10K LoC
摘要:
在交互式定理证明器中,使用函数式语言来实现证明策略作为证明策略,通常提供简短,简洁和优雅的实现。虽然优雅,高阶特征和组合子语言的使用往往会导致策略的非常程序化的视图,这可能会严重偏离其背后的高级思想。这可能会使策略难以理解,因此对于专家和非专家来说都难以调试和维护:为了分析整个战略的失败,人们经常不得不手动地拆开较低级别战术的复杂组合。在一个工业技术转让项目中,我们一直致力于将一个非常大而复杂的证明策略移植到PSGraph中,PSGraph是一种由Tinker工具支持的用于表示证明策略的图形语言。这项工作的目标是提高战术的可理解性和可维护性。在此基础上,我们扩展了PSGraph,增加了用于开发和调试的其他功能。通过对几种现有策略的重新实现和重构,展示了PSGraph在调试、可读性和可维护性等方面与典型的线性(基于术语)策略语言相比的优势。为了给其他人提供指导,我们对这两种方法的用户体验进行了相当详细的比较。该文件由一个网页提供支持,该网页提供有关实施的进一步细节以及示例的交互式插图。
英文摘要:
The use of a functional language to implement proof strategies as proof tactics in interactive theorem provers, often provides short, concise and elegant implementations. Whilst being elegant, the use of higher order features and combinator languages often results in a very procedural view of a strategy, which may deviate significantly from the high-level ideas behind it. This can make a tactic hard to understand and hence difficult to to debug and maintain for experts and non-experts alike: one often has to tear apart complex combinations of lower level tactics manually in order to analyse a failure in the overall strategy. In an industrial technology transfer project, we have been working on porting a very large and complex proof tactic into PSGraph, a graphical language for representing proof strategies, supported by the Tinker tool. The goal of this work is to improve understandability and maintainability of tactics. Motivated by some initial successes with this, we here extend PSGraph with additional features for development and debugging. Through the re-implementation and refactoring of several existing tactics, we demonstrates the advantages of PSGraph compared with a typical linear (term-based) tactic language with respect to debugging, readability and maintenance. In order to act as guidance for others, we give a fairly detailed comparison of the user experience with the two approaches. The paper is supported by a web page providing further details about the implementation as well as interactive illustrations of the examples.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。