Structural subtyping of non-recursive types is decidable

We show that the first-order theory of structural subtyping of non-recursive types is decidable, as a consequence of a more general result on the decidability of term powers of decidable theories. Let /spl Sigma/ be a language consisting of function symbol and let /spl Cscr/; (with a finite or infinite domain C) be an L-structure where L is a language consisting of relation symbols. We introduce the notion of /spl Sigma/-term-power of the structure /spl Cscr/; denoted /spl Pscr/;/sub /spl Sigma//(/spl Cscr/;). The domain of /spl Pscr/;/sub /spl Sigma//(/spl Cscr/;) is the set of /spl Sigma/-terms over the set C. /spl Pscr/;/sub /spl Sigma//(/spl Cscr/;) has one term algebra operation for each f /spl isin/ /spl Sigma/, and one relation for each r /spl isin/ L defined by lifting operations of /spl Cscr/; to terms over C. We extend quantifier for term algebras and apply the Feferman-Vaught technique for quantifier elimination in products to obtain the following result. Let K be a family of L-structures and K/sub P/ the family of their /spl Sigma/-term-powers. Then the validity of any closed formula F on K/sub P/ can be effectively reduced to the validity of some closed formula q(F) on K. Our result implies the decidability of the first-order theory of structural subtyping of non-recursive types with covariant constructors, and the construction generalizes to contravariant constructors as well.

[1]  C. Ward Henson,et al.  A Uniform Method for Proving Lower Bounds on the Computational Complexity of Logical Theories , 1990, Ann. Pure Appl. Log..

[2]  Andreas Podelski,et al.  Set constraints with intersection , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[3]  Andrei Voronkov,et al.  A decision procedure for term algebras with queues , 2001, TOCL.

[4]  Gert Smolka,et al.  A Feature Constraint System for Logic Programming with Entailment , 1994, Theor. Comput. Sci..

[5]  S. C. Kleene,et al.  Introduction to Metamathematics , 1952 .

[6]  Hubert Comon-Lundh,et al.  Equational Formulae with Membership Constraints , 1994, Inf. Comput..

[7]  Wilfrid Hodges,et al.  Model Theory: The existential case , 1993 .

[8]  John C. Mitchell,et al.  Type inference with simple subtypes , 1991, Journal of Functional Programming.

[9]  J. Ferrante,et al.  The computational complexity of logical theories , 1979 .

[10]  Igor Walukiewicz,et al.  Monadic Second Order Logic on Tree-Like Structures , 1996, STACS.

[11]  Witold Charatonik,et al.  Set constraints with projections are in NEXPTIME , 1994, Proceedings 35th Annual Symposium on Foundations of Computer Science.

[12]  Vincent Simonet,et al.  Type Inference with Structural Subtyping: A Faithful Formalization of an Efficient Constraint Solver , 2003, APLAS.

[13]  T. Jim,et al.  Type inference in systems of recursive types with subtyping , 1997 .

[14]  A. Aiken,et al.  Decidability of Systems of Set Constraints with Negative Constraints , 1994 .

[15]  Andrzej Mostowski,et al.  On direct products of theories , 1952, Journal of Symbolic Logic.

[16]  Igor Walukiewicz Monadic second-order logic on tree-like structures , 2002, Theor. Comput. Sci..

[17]  John C. Mitchell,et al.  Lower bounds on type inference with subtypes , 1995, POPL '95.

[18]  Olivier Tardieu,et al.  Ultra-fast aliasing analysis using CLA: a million lines of C code in a second , 2001, PLDI '01.

[19]  William C. Rounds,et al.  Feature Logics , 1997, Handbook of Logic and Language.

[20]  François Pottier,et al.  Simplifying subtyping constraints , 1996, ICFP '96.

[21]  Jerzy Tiuryn Subtype inequalities , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[22]  Jens Palsberg,et al.  A type system equivalent to flow analysis , 1995, TOPL.

[23]  Jens Palsberg,et al.  Strong Normalization with Non-Structural Subtyping , 1995, Math. Struct. Comput. Sci..

[24]  Joachim Niehren,et al.  Ordering Constraints over Feature Trees Expressed in Second-Order Monadic Logic , 2000, Inf. Comput..

[25]  Lars Ole Andersen,et al.  Program Analysis and Specialization for the C Programming Language , 2005 .

[26]  Frank Pfenning,et al.  Refinement types for ML , 1991, PLDI '91.

[27]  Greg Nelson,et al.  Fast Decision Procedures Based on Congruence Closure , 1980, JACM.

[28]  Hubert Comon-Lundh,et al.  Equational Problems and Disunification , 1989, J. Symb. Comput..

[29]  Joachim Niehren,et al.  The first-order theory of subtyping constraints , 2002, POPL '02.

[30]  Ralf Treinen,et al.  Feature Trees over Arbitrary Structures , 1997, UNIF.

[31]  Luca Cardelli,et al.  Subtyping recursive types , 1991, POPL '91.

[32]  Fritz Henglein,et al.  The complexity of subtype entailment for simple types , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[33]  P. M. Cohn,et al.  THE METAMATHEMATICS OF ALGEBRAIC SYSTEMS , 1972 .

[34]  Alexandre Frey Satisfying subtype inequalities in polynomial space , 2002, Theor. Comput. Sci..

[35]  Rolf Backofen A Complete Axiomatization of a Theory with Feature and Arity Constraints , 1995, J. Log. Program..

[36]  Michael Kohlhase,et al.  A Mechanization of Strong Kleene Logic for Partial Functions , 1994, CADE.

[37]  Scott F. Smith,et al.  Subtyping Constrained Types , 1996, SAS.

[38]  Frank Pfenning,et al.  Intersection types and computational effects , 2000, ICFP '00.

[39]  Alexander Aiken,et al.  Soft typing with conditional types , 1994, POPL '94.

[40]  Jens Palsberg,et al.  Efficient recursive subtyping , 1992, POPL '93.

[41]  Viktor Kuncak,et al.  On the Theory of Structural Subtyping , 2004, ArXiv.

[42]  Michael J. Maher Complete axiomatizations of the algebras of finite, rational and infinite trees , 1988, [1988] Proceedings. Third Annual Information Symposium on Logic in Computer Science.

[43]  Thomas Sturm,et al.  Quantifier Elimination in Term Algebras The Case of Finite Languages , 2002 .

[44]  Joachim Niehren,et al.  The first-order theory of ordering constraints over feature trees , 1998, Proceedings. Thirteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.98CB36226).

[45]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[46]  S. Feferman,et al.  The first order properties of products of algebraic systems , 1959 .