We extend the classical notion of solvability to a lambda-calculus equipped with pattern matching. We prove that solvability can be characterized by means of typability and inhabitation in an intersection type system P based on non-idempotent types. We show first that the system P characterizes the set of terms having canonical form, i.e. that a term is typable if and only if it reduces to a canonical form. But the set of solvable terms is properly contained in the set of canonical forms. Thus, typability alone is not sufficient to characterize solvability, in contrast to the case for the lambda-calculus. We then prove that typability, together with inhabitation, provides a full characterization of solvability, in the sense that a term is solvable if and only if it is typable and the types of all its arguments are inhabited. We complete the picture by providing an algorithm for the inhabitation problem of P.
翻译:我们把传统的可溶性概念扩大到配有模式匹配的羊羔-计算器。 我们证明,可溶性可以用基于非无能类型的交叉类型系统P的打字和居住方式来描述。 我们首先显示, 系统P 将一组术语定性为具有可塑形式, 也就是说, 只有当一个术语降为可塑形式时, 并且只有在该术语降为可塑形式时才可打字。 但是, 一套可溶性术语被适当包含在一套可塑形式中。 因此, 单是可塑性并不足以给可溶性定性, 与羊羔- 计算器的情况不同。 我们随后证明, 与可塑性一起提供可塑性的完整特征描述, 也就是说, 只有当一个术语可以打字, 并且它的所有参数类型都存在时, 才能打字可以打字。 我们通过提供P 居住问题的算法来完成这一图象。