Type Inference with Structural Subtyping: A Faithful Formalization of an Efficient Constraint Solver
نویسنده
چکیده
We are interested in type inference in the presence of structural subtyping from a pragmatic perspective. This work combines theoretical and practical contributions: first, it provides a faithful description of an efficient algorithm for solving and simplifying constraints; whose correctness is formally proved. Besides, the framework has been implemented in Objective Caml, yielding a generic type inference engine. Its efficiency is assessed by a complexity result and a series of experiments in realistic cases.
منابع مشابه
Type inference with structural subtyping: A faithful formalization of an efficient constraint solver
متن کامل
Type inference for MLj
MLj is an extension of the Standard ML language which allows interoperation with Java. It has a type system which combines ML’s parametric polymorphism and type inference with Java’s subtyping (class hierarchy) and arbitrary overloading of methods. In this paper, we discuss some of the difficulties in implementing type inference for MLj and outline our progress on the implementation. In particu...
متن کاملA Constraint-Based Presentation and Generalization of Rows
We study the combination of possibly conditional nonstructural subtyping constraints with rows. We give a new presentation of rows, where row terms disappear; instead, we annotate constraints with filters. We argue that, in the presence of subtyping, this approach is simpler and more general. In the case where filters are finite or cofinite sets of row labels, we give a constraint solving algor...
متن کاملGeneral Homomorphic Overloading
A general homomorphic overloading in a first-order type system is discussed. Type inference is applied within predefined classes each containing an arbitrary first-order subtyping hierarchy. We propose a computationally efficient type inference algorithm by converting the attendant constraint-satisfaction problem into the algebraic path problem for a constraint graph weighted with elements of a...
متن کاملType inference in systems of recursive types with subtyping
We present general methods for performing type inference and deciding subtyping in languages with recursive types. Our type inference algorithm generalizes a common idea of previous work: type inference is reduced to a constraint satisfaction problem, whose satisfiability can be decided by a process of closure and consistency checking. We prove a general correctness theorem for this style of ty...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2003