Isomorphisms are back!
Résumé
Sometimes, we need a function so deeply that we have to go out and search for it. How do we find it ? Sometimes, we have clues: a function which manipulates list is probably in the Listmodule. . . but not always! Sometimes, all we have is its functionality: doing the sum of a list of integers. Unfortunately, search by functionality is difficult. Rittri [1] proposed an approximation: use the type of the function as a key to search through libraries: in our case, int list->int. To avoid stumbling over details such as the order of arguments, he proposed to use matching modulo type isomorphism – a notion broader than syntactic equality. Unfortunately, algorithms for unification modulo type isomorphisms are extremely costly. Doing an exhaustive search over the whole ML ecosystem was possible at the time (with a standard library of 294 functions), but is certainly not possible anymore for the OCaml ecosystem, with 3259 opam packages, each containing several hundreds or thousands of functions.
Origine | Fichiers produits par l'(les) auteur(s) |
---|