Title :
The complexity of subtype entailment for simple types
Author :
Henglein, Fritz ; Rehof, Jakob
Author_Institution :
Dept. of Comput. Sci., Copenhagen Univ., Denmark
fDate :
29 Jun-2 Jul 1997
Abstract :
A subtyping τ⩽τ´ is entailed by a set of subtyping constraints C, written C |=τ⩽τ´, if every valuation (mapping of type variables to ground types) that satisfies C also satisfies τ⩽τ´. We study the complexity of subtype entailment for simple types over lattices of base types. We show that: deciding C |=τ⩽τ´ is coNP-complete; deciding C |=α⩽β for consistent, atomic C and α, β atomic can be done in linear time. The structural lower (coNP-hardness) and upper (membership in coNP) bounds as well as the optimal algorithm for atomic entailment are new. The coNP-hardness result indicates that entailment is strictly harder than satisfiability, which is known to be in PTIME for lattices of base types. The proof of coNP-completeness gives an improved algorithm for deciding entailment and puts a precise complexity-theoretic marker on the intuitive “exponential explosion” in the algorithm. Central to our results is a novel characterization of C |=α⩽β for atomic, consistent C. This is the basis for correctness of the linear-time algorithm as well as a complete axiomatization of C |=α⩽β for atomic C by extending the usual proof rules for subtype inference. It also incorporates the fundamental insight for understanding the structural complexity bounds in the general case
Keywords :
computability; computational complexity; inference mechanisms; type theory; atomic entailment; axiomatization; coNP-completeness; complexity-theoretic marker; exponential explosion; linear-time algorithm; satisfiability; structural complexity bounds; subtype entailment complexity; subtype inference; Calculus; Computer languages; Computer science; Cost accounting; Explosions; Inference algorithms; Lattices; Logic; Power generation; Power system modeling;
Conference_Titel :
Logic in Computer Science, 1997. LICS '97. Proceedings., 12th Annual IEEE Symposium on
Conference_Location :
Warsaw
Print_ISBN :
0-8186-7925-5
DOI :
10.1109/LICS.1997.614961