ICFP 2024
Mon 2 - Sat 7 September 2024 Milan, Italy
Fri 6 Sep 2024 15:00 - 15:30 at Orange 2 - Session 3 Chair(s): Guillaume Munch-Maccagnoni

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.

Slides (dowsing.pdf)558KiB
Extended Abstract (main.pdf)461KiB

Fri 6 Sep

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change