We introduce REST, a novel term rewriting technique for theorem proving that uses online termination checking and can be integrated with existing program verifiers. REST enables flexible but terminating term rewriting for theorem proving by: (1) exploiting newly-introduced term orderings that are more permissive than standard rewrite simplification orderings; (2) dynamically and iteratively selecting orderings based on the path of rewrites taken so far; and (3) integrating external oracles that allow steps that cannot be justified with rewrite rules. Our REST approach is designed around an easily implementable core algorithm, parameterizable by choices of term orderings and their implementations; in this way our approach can be easily integrated into existing tools. We implemented REST as a Haskell library and incorporated it into Liquid Haskell's evaluation strategy, extending Liquid Haskell with rewriting rules. We evaluated our REST implementation by comparing it against both existing rewriting techniques and E-matching and by showing that it can be used to supplant manual lemma application in many existing Liquid Haskell proofs.
翻译:我们引入了REST, 这是一种新颖的理论重写技术,用来证明使用在线终止检查,并且可以与现有的程序验证者相结合。 REST允许灵活但终止术语重写理论的证明:(1) 利用比标准重写简化订单更宽松的新引入术语;(2) 动态和迭接地根据迄今为止采用的重写路径选择订单;(3) 整合外部信箱,以便能够根据重写规则采取不合理的步骤。 我们的REST方法是围绕一个容易实施的核心算法设计的,该算法可以通过选择术语订单及其实施加以衡量; 这样,我们的方法可以很容易地融入现有工具。 我们把REST作为Haskell图书馆, 并将其纳入Lior Haskell的评估战略, 扩展液体哈斯凯尔(Haskell) 与重写规则。 我们评估了我们执行REST的情况,方法是将它与现有的重写技术和电子比对它进行比较,并表明它可用于在许多现有的液体哈斯凯尔证据中用于更新手力Lemma应用。