最内层重写的可达性分析
Reachability Analysis of Innermost Rewriting
摘要:
我们考虑的问题推断一个语法描述的功能程序的输出给定的语法描述其输入。这个问题的解决方案有助于检测错误或证明函数式程序的安全性,并且存在用于解决这个问题的几种重写工具。然而,已知的语法推理技术不能考虑程序的评估策略。当评估策略很重要时,这会产生非常不精确的结果。在这项工作中,我们适应树自动机完成算法,以准确地近似下的最内层策略重写可达到的条款。我们正式证明,所提出的技术是健全的和精确的w.r.t.最深处的重写我们表明,这些结果可以扩展到最左和最右最内的情况。一般最内层情况下的算法已经在Timbuk可达性工具中实现。实验结果表明,该方法显著提高了函数式程序静态分析的准确性。
英文摘要:
We consider the problem of inferring a grammar describing the output of a functional program given a grammar describing its input. Solutions to this problem are helpful for detecting bugs or proving safety properties of functional programs, and several rewriting tools exist for solving this problem. However, known grammar inference techniques are not able to take evaluation strategies of the program into account. This yields very imprecise results when the evaluation strategy matters. In this work, we adapt the Tree Automata Completion algorithm to approximate accurately the set of terms reachable by rewriting under the innermost strategy. We formally prove that the proposed technique is sound and precise w.r.t. innermost rewriting. We show that those results can be extended to the leftmost and rightmost innermost case. The algorithms for the general innermost case have been implemented in the Timbuk reachability tool. Experiments show that it noticeably improves the accuracy of static analysis for functional programs using the call-by-value evaluation strategy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。