基于Horn约束优化的精化类型推断
Refinement Type Inference via Horn Constraint Optimization
摘要:
我们提出了一种新的方法来推断高阶函数程序的精化类型。所提出的方法的主要优点是它可以推断最大优选(即,Pareto最优)细化类型。所提出的方法实现的灵活优化的细化类型铺平了道路,有趣的应用程序,如推断最一般的输入特性,一个给定的程序满足(或违反)给定的安全(或终止)属性。我们的方法减少了这样一个类型的优化问题的Horn约束优化问题,通过使用一个新的细化类型的系统,可以灵活的原因在程序中的非确定性。然后,我们的方法通过反复改进当前解决方案,直到通过基于模板的不变式生成收敛来解决约束优化问题。我们已经实现了一个原型推理系统的基础上,我们的方法,并取得了可喜的成果,在初步的实验。
英文摘要:
We propose a novel method for inferring refinement types of higher-order functional programs. The main advantage of the proposed method is that it can infer maximally preferred (i.e., Pareto optimal) refinement types with respect to a user-specified preference order. The flexible optimization of refinement types enabled by the proposed method paves the way for interesting applications, such as inferring most-general characterization of inputs for which a given program satisfies (or violates) a given safety (or termination) property. Our method reduces such a type optimization problem to a Horn constraint optimization problem by using a new refinement type system that can flexibly reason about non-determinism in programs. Our method then solves the constraint optimization problem by repeatedly improving a current solution until convergence via template-based invariant generation. We have implemented a prototype inference system based on our method, and obtained promising results in preliminary experiments.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。