弱包容约束的类型诊断增量算法
Weak subsumption Constraints for Type Diagnosis: An Incremental Algorithm
摘要:
我们引入了高阶并发约束语言的类型检查所需的约束,并用增量算法求解。我们的约束系统通过约束x $\subseteq$ y扩展了有理统一,即“$x$至少具有$y$”的结构,由树之间的弱实例关系建模。这种实例的概念是经过精心选择的,比通常的使半统一不可判定的概念要弱。半统一已不止一次地用于连接类型推理和计算语言学中考虑的统一问题。正如多态递归对应于包容通过半统一问题,我们的类型约束问题对应于弱包容的特征图在语言学。Dörre~ \cite{Doerre:WeakSubsumption:94}解决了特征图\WhatsIt的可判定性问题。\nocite{RuppRosnerJohnson:94}与Dörre的算法相反,我们的算法是完全增量的,不涉及有限状态自动机。我们的算法也更加灵活。它允许许多扩展(记录,排序,析取类型,类型声明等),使其适合于成熟的编程语言的类型推断。
英文摘要:
We introduce constraints necessary for type checking a higher-order concurrent constraint language, and solve them with an incremental algorithm. Our constraint system extends rational unification by constraints x$\subseteq$ y saying that ``$x$ has at least the structure of $y$'', modelled by a weak instance relation between trees. This notion of instance has been carefully chosen to be weaker than the usual one which renders semi-unification undecidable. Semi-unification has more than once served to link unification problems arising from type inference and those considered in computational linguistics. Just as polymorphic recursion corresponds to subsumption through the semi-unification problem, our type constraint problem corresponds to weak subsumption of feature graphs in linguistics. The decidability problem for \WhatsIt for feature graphs has been settled by Dörre~\cite{Doerre:WeakSubsumption:94}. \nocite{RuppRosnerJohnson:94} In contrast to Dörre's, our algorithm is fully incremental and does not refer to finite state automata. Our algorithm also is a lot more flexible. It allows a number of extensions (records, sorts, disjunctive types, type declarations, and others) which make it suitable for type inference of a full-fledged programming language.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。