Light-speed type unification modulo isomorphisms - Inria - Institut national de recherche en sciences et technologies du numérique
Communication Dans Un Congrès Année : 2024

Light-speed type unification modulo isomorphisms

Résumé

One essential task of programmers it to use the right library and function. But what is the right function? Most developers use their experience and knowledge of the ecosystem to intuit where to look for. Tools like Sherlodoc or Hoogle provide textual search in an ecosystem of functions, easing the quest of the developer. To go further, Dowsing allow searching OCaml functions by their types: the developer provides a type, and Dowsing finds a function whose type is suitable. More precisely, it finds any functions whose type is more general, up to a set of isomorphisms such as currying or reordering of arguments. Results are guaranteed to be sound (the type does match) and complete (all such functions are found). Unfortunately such search is costly, relying on "unification modulo isomorphisms" (which is NP-complete). So far, Dowsing relied on database-style indexation techniques and state-of-the-art unification algorithms, enabling search over a set of local libraries, but exhibiting poor performances for very polymorphic queries. In this article, we present several improvements to unification modulo isomorphism which makes Dowsing up to 500 times faster on complex queries. This brings Dowsing in a new area where it can be used interactively by developers.
Fichier principal
Vignette du fichier
main.pdf (454.12 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04794390 , version 1 (20-11-2024)

Licence

Identifiants

  • HAL Id : hal-04794390 , version 1

Citer

Emmanuel Arrighi, Gabriel Radanne. Light-speed type unification modulo isomorphisms. ML Workshop 2024, Sep 2024, Milan, Italy. ⟨hal-04794390⟩
8 Consultations
1 Téléchargements

Partager

More