Efficient algorithms for isomorphisms of simple types

The <i>first order isomorphism problem</i> is to decide whether two non-recursive types using product- and function-type constructors, are isomorphic under the axioms of commutative and associative products, and currying and distributivity of functions over products. We show that this problem can be solved in <i>O</i>(<i>n</i> log<sup>2</sup> <i>n</i>) time and <i>O</i>(<i>n</i>) space, where is <i>n</i> the input size. This result improves upon the <i>O</i>(<i>n</i> log<sup>2</sup> <i>n</i>) time and <i>O</i>(<i>n</i><sup>2</sup>) space bounds of the best previous algorithm. We also describe an <i>O</i>(<i>n</i>) time algorithm for the <i>linear isomorphism problem</i>, which does not include the distributive axiom, whereby improving upon the <i>O</i>(<i>n</i> log <i>n</i>) time of the best previous algorithm for this problem.

[1]  Roberto Di Cosmo Review of Isomorphisms of Types:: from λ-calculus to information retrieval and language design , 1997 .

[2]  Kim B. Bruce,et al.  Provable isomorphisms and domain equations in models of typed languages , 1985, STOC '85.

[3]  Roberto Di Cosmo,et al.  Remarks on isomorphisms in typed lambda calculi with empty and sum types , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[4]  Jens Palsberg,et al.  Efficient and Flexible Matching of Recursive Types , 2001, Inf. Comput..

[5]  Jeffrey Considine Deciding Isomorphisms of Simple Types in Polynomial Time , 2000 .

[6]  Christopher League Review of Isomorphisms of Types:: from λ-calculus to information retrieval and language design by Roberto Di Cosmo (Birkhauser, 1995) , 1997, SIGA.

[7]  M. Pdttri Retrieving library identifiers via equational matching of types , 1990 .

[8]  S. Solov′ev The category of finite sets and Cartesian closed categories , 1983 .

[9]  Sergei Soloviev,et al.  A Deciding Algorithm for Linear Isomorphism of Types with Complexity O (n log2(n)) , 1997, Category Theory and Computer Science.

[10]  David A. Basin,et al.  Equality of Terms Containing Associative-Commutative Functions and Commutative Binding Operators in Isomorphism Complete , 1990, CADE.

[11]  G. Sacks A DECISION METHOD FOR ELEMENTARY ALGEBRA AND GEOMETRY , 2003 .

[12]  William A. Howard,et al.  The formulae-as-types notion of construction , 1969 .

[13]  Joseph Gil,et al.  Subtyping arithmetical types , 2001, POPL '01.

[14]  Roberto Di Cosmo,et al.  Provable isomorphisms of types , 1992, Mathematical Structures in Computer Science.

[15]  Mikael Rittri,et al.  Using types as search keys in function libraries , 1989, Journal of Functional Programming.

[16]  Roberto Di Cosmo,et al.  Type isomorphisms in a type-assignment framework , 1992, POPL '92.

[17]  Roberto Di Cosmo,et al.  Isomorphisms of Types , 1995, Progress in Theoretical Computer Science.

[18]  R. Gurevič Equational theory of positive numbers with exponentiation , 1985 .

[19]  Jens Palsberg,et al.  Efficient Type Matching , 2002, FoSSaCS.