## Retrieving Library Identifiers via Equational Matching of Types (1992)

Venue: | Proceedings of the 10th International Conference on Automated Deduction, volume 449 of LNAI |

Citations: | 24 - 1 self |

### BibTeX

@INPROCEEDINGS{Rittri92retrievinglibrary,

author = {Mikael Rittri and Mikael Rittri},

title = {Retrieving Library Identifiers via Equational Matching of Types},

booktitle = {Proceedings of the 10th International Conference on Automated Deduction, volume 449 of LNAI},

year = {1992},

pages = {603--617},

publisher = {Springer Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

In functional programming environments, one can use types as search keys in program libraries, if one disregards trivial differences in argument order or currying. A way to do this is to identify types that are isomorphic in every Cartesian closed category; simpler put, types should be identified if they are equal under an arithmetic interpretation, with Cartesian product as multiplication and function space as exponentiation. When the type system is polymorphic, one may also want to retrieve identifiers of types more general than the query. This paper describes a method to do both, that is, an algorithm for pattern matching modulo canonical CCC-isomorphism. The algorithm returns a finite complete set of matchers. An implementation shows that satisfactory speed can be achieved for library search. Contents 1 Introduction 2 2 Unification/Matching in Equational Theories 6 3 Comparison with Previous Work 9 4 An Algorithm for \Gamma-matching 14 5 Practical Experience of Library Search 25 6...

### Citations

358 |
Principal type-schemes for functional programs
- Damas, Milner
- 1982
(Show Context)
Citation Context ...o construct an axolotl, one should query with x) Axolotl and allow x to be instantiated to a specific type. The words free and bound are derived from the modern view of polymorphic types, as given in =-=[DM82]. In that view, type-=- variables may be bound by quantifiers, so polymorphic types are not just first order terms. Already in [Mil78], a distinction was made between "generic" and "non-generic" variable... |

111 | Recherches sur la Theorie de la Demonstration, Travaux de la Societe des Sciences et de Lettres de Varsovie - Herbrand - 1930 |

95 | Equations and rewrite rules - a survey - Huet, Oppen - 1980 |

23 |
The Chalmers lazy-ML compiler
- Augustsson, Johnsson
- 1989
(Show Context)
Citation Context ...n matching systems are never generated explicitly; the representation used is more like AND-OR-trees. My search system is implemented in Standard ML [Rea89], but for my tests, I have used the Lazy ML =-=[AJ89]-=- library. The test library contains 185 identifiers, but I preprocessed it to reduce the number of attempted matches. First, library types that are \Gamma-instances of each other share a single entry.... |

23 |
Computing unification algorithms
- Kirchner
(Show Context)
Citation Context ...hs n ; t n ig. The set UE (S) of E-unifiers of such a system S consists of those substitutions that unifies all of the pairs, that is, UE (S) = " hs;ti2S UE hs; ti An E-unification disjunction sy=-=stem [Kir86] is a set -=-of E-unification systems. The set UE (D) of E-unifiers of a disjunction system D consist of those that unify 2 Thus, the symbolscan be read as "less specific than", following the tradition i... |

19 |
Complete Sets of Unifiers and Matchers in Equational Theories
- Fages, Huet
- 1986
(Show Context)
Citation Context ...my notation from several sources, mostly [HO80, FH86, Tid86, Kir86, Sie89]. When the definitions vary, which they do only in details, I have picked one that seemed appropriate, though I stay close to =-=[FH86]-=-. This section is sparse in motivations and is not intended as an introduction to the subject. I have found the introductory parts of [Tid86] readable for a beginner, and [Sie89] is a survey article t... |

9 |
Equational theory of positive numbers with exponentiation
- Gurevi˘c
- 1985
(Show Context)
Citation Context ...ationally complete for arithmetic is known as Tarski's high school algebra problem. A. J. Wilkie found a counter-example [Wil81], and R. Gurevic showed recently that no finite axiomatization suffices =-=[Gur90]-=-. 3 interpret a query A as asking for all identifiers e in the library for which e : A holds. These are, in fact, the identifiers whose most general types are at least as general as A. One can compare... |

9 |
Associative commutative pattern matching
- Hullot
- 1979
(Show Context)
Citation Context ... algorithm. 1. The definition and properties of bases of terms and substitutions. 2. How to find base matchers by ACU-matching. (This will not be described in this paper, though, since the methods of =-=[Hul79]-=- or [Sti81] suffice.) 3. How to find a most \Gamma-general substitution with a given base. We will define a function `Mg' that does this. This function needs a supply Y of fresh variables, so we will ... |

5 |
Some Relationships between Unification, Restricted Unification, and
- Bürckert
- 1986
(Show Context)
Citation Context ...and Schmidt-Schau have given an equational theory in which unification is trivially decidable when only interpreted symbols are allowed, but becomes undecidable when a single free constant is allowed =-=[Bur86]-=-. Note that the variables in the subject of a matching problem are never instantiated, and therefore behave like free constants. If we have access to an arbitrary number of free constants when we matc... |

1 | Provable isomorphisms of types. Research report LIENS--90--14, Ecole Normale Sup'erieure - Bruce, Cosmo, et al. - 1990 |

1 | A type-checker. Chapter 9 of - Hancock - 1987 |

1 |
Coherence and valid isomorphism in closed categories
- Longo, Asperti, et al.
- 1989
(Show Context)
Citation Context ... based on similar work by Bernard Lang [Lan78]. Although my own motivation is library search, others have suggested applications for program transformation [NPS89] and type-checking up to equivalence =-=[LADC89]-=-. In this introduction, I will first summarize the reasons to use an equivalence relation during library search, and then I will explain why more general types should be found. In Section 2, I review ... |