首页> 外文会议>Annual ACM SIGPLAN-SIGACT symposium on principles of programming languages >Verifying Higher-Order Functional Programs with Pattern-Matching Algebraic Data Types
【24h】

Verifying Higher-Order Functional Programs with Pattern-Matching Algebraic Data Types

机译:使用模式匹配的代数数据类型验证高阶功能程序

获取原文

摘要

Type-based model checking algorithms for higher-order recursion schemes have recently emerged as a promising approach to the verification of functional programs. We introduce pattern-matching recursion schemes (PMRS) as an accurate model of computation for functional programs that manipulate algebraic data-types. PMRS are a natural extension of higher-order recursion schemes that incorporate pattern-matching in the defining rules. This paper is concerned with the following (undecidable) verification problem: given a correctness property Φ, a functional program V (qua PMRS) and a regular input set 1. does every term that is reachable from I under rewriting by V satisfy Φ? To solve the PMRS verification problem, we present a sound semi-algorithm which is based on model-checking and counterexample guided abstraction refinement. Given a no-instance of the verification problem, the method is guaranteed to terminate. From an order-n PMRS and an input set generated by a regular tree grammar, our method constructs an order-n weak PMRS which over-approximates only the first-order pattern-matching behaviour, whilst remaining completely faithful to the higher-order control flow. Using a variation of Kobayashi's type-based approach, we show that the (trivial automaton) model-checking problem for weak PMRS is decidable. When a violation of the property is detected in the abstraction which does not correspond to a violation in the model, the abstraction is automatically refined by 'unfolding' the pattern-matching rules in the program to give successively more and more accurate weak PMRS models.
机译:基于类型的模型检查算法用于高阶递归方案,最近被出现为验证功能计划的有希望的方法。我们将模式匹配的递归方案(PMR)介绍,作为操作代数数据类型的功能程序的准确计算模型。 PMRS是高阶递归方案的自然扩展,该方案在定义规则中包含了模式匹配。本文涉及以下(未定定)验证问题:给定正确的属性φ,功能程序v(QUA PMR)和常规输入集1.每个术语可以从我重写的IS满足Φ到达φ?为了解决PMRS验证问题,我们介绍了一种基于模型检查和监控引导抽象改进的声音半算法。鉴于验证问题的no-dirment,保证该方法终止。来自Order-N PMR和由常规树语语法生成的输入集,我们的方法构造了一个Order-n弱PMR,其仅近似于一阶模式匹配行为,同时仍然完全忠于更高阶控制流动。利用基于Kobayashi的类型的方法的变化,我们表明(琐碎的自动机)模型检查问题弱PMR是可判定的。当在抽象中检测到该属性的违规时,该抽象不对应于模型中的违规时,通过“展开”程序中的模式匹配规则在程序中自动改进,以越来越准确的PMRS模型。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号