Deciding Isomorphisms of Simple Types in Polynomial Time
MetadataShow full item record
Citation (published version)Considine, Jeffrey. "Deciding Isomorphisms of Simple Types in Polynomial Time", Technical Report BUCS-2000-010, Computer Science Department, Boston University, April 2, 2000. [Available from: http://hdl.handle.net/2144/1804]
The isomorphisms holding in all models of the simply typed lambda calculus with surjective and terminal objects are well studied - these models are exactly the Cartesian closed categories. Isomorphism of two simple types in such a model is decidable by reduction to a normal form and comparison under a finite number of permutations (Bruce, Di Cosmo, and Longo 1992). Unfortunately, these normal forms may be exponentially larger than the original types so this construction decides isomorphism in exponential time. We show how using space-sharing/hash-consing techniques and memoization can be used to decide isomorphism in practical polynomial time (low degree, small hidden constant). Other researchers have investigated simple type isomorphism in relation to, among other potential applications, type-based retrieval of software modules from libraries and automatic generation of bridge code for multi-language systems. Our result makes such potential applications practically feasible.