On the Complexity of Type Inference with Coercion. Wand, M. & O'Keefe, P. M. In Conf. on Functional Programming Languages and Computer Architecture, 1989.
abstract   bibtex   
We consider the following problem: Given a partial order $(C, \le)$ of base types and coercions between them, a set of constants with types generated from $C$, and a term $M$ in the lambda calculus with these constants, does $M$ have a typing with this set of types? This problem abstracts the problem of typability over a fixed set of base types and coercions (\it e.g.\ int $\le$ real, or a fixed set of coercions between opaque data types). We show that in general, the problem of typability of lambda-terms over a given partially-ordered set of base types is NP-complete. However, if the partial order is known to be a tree, then the satisfiability problem is solvable in (low-order) polynomial time. The latter result is of practical importance, as trees correspond to the coercion structure of single-inheritance object systems.
@InProceedings{WandOkeefe89,
  author = 	"Mitchell Wand and Patrick M. O'Keefe",
  title = 	"On the Complexity of Type Inference with Coercion",
  booktitle = 	"Conf. on Functional Programming Languages and
  Computer Architecture",
  year = 	"1989",
  OPTeditor = 	"",
  OPTpages = 	"293-298",
  OPTorganization = 	"",
  OPTpublisher = 	"",
  OPTaddress = 	"London",
  OPTmonth = 	sep,
  OPTnote = 	"",
  abstract =    "We consider the following problem: Given a partial order $(C, \le)$ of base
types and coercions between them, a set of constants with types generated from
$C$, and a term $M$ in the lambda calculus with these constants, does $M$ have
a typing with this set of types?  This problem abstracts the problem of
typability over a fixed set of base types and coercions ({\it e.g.}\ int $\le$
real, or a fixed set of coercions between opaque data types).  We show that in
general, the problem of typability of lambda-terms over a given
partially-ordered set of base types is NP-complete. However, if the partial
order is known to be a tree, then the satisfiability problem is solvable in
(low-order) polynomial time.  The latter result is of practical importance, as
trees correspond to the coercion structure of single-inheritance object
systems."

}

Downloads: 0