skip to main content
10.1145/3374587.3374633acmotherconferencesArticle/Chapter ViewAbstractPublication PagescsaiConference Proceedingsconference-collections
research-article

A Novel Type-based API Search Engine for Open Source Elm Packages

Authors Info & Claims
Published:04 March 2020Publication History

ABSTRACT

Searching for API is a hard problem, as text is not commonly representative of what a program does. In this paper, we present Moogle, a type-based API search engine for open-source Elm packages, with an online demonstration1. In Moogle, queries are based on names or type signatures, whose adequate information is leveraged for matching APIs from open-source libraries. Moogle applies unification algorithm, where generic type signatures can be matched to concrete ones and vice versa. In order to optimize the performance of applied matches, Moogle stores information of type signatures in an AST-based graph model, by applying graph DBMS, Neo4j. Moogle also has its implementation on a parser to convert its DSL, MoogleQL, into AST data models or string queries. According to our test, Moogle outperforms its congeneric work, Elm-search2, on many aspects including search range and allowed patterns with acceptable trade-offs.

References

  1. Amir Saboury, Pooya Musavi, Foutse Khomh, and Giulio An-toniol. 2017. An empirical study of code smells in javascript projects. In 2017 IEEE 24th international conference on software analysis, evolution and reengineering (SANER). IEEE, 294--305.Google ScholarGoogle ScholarCross RefCross Ref
  2. Nicholas C Zakas. 2012. Maintainable JavaScript: Writing Readable Code. " O'Reilly Media, Inc.".Google ScholarGoogle Scholar
  3. Neil Mitchell. 2019. Hoogle. https://hoogle.haskell.org/Google ScholarGoogle Scholar
  4. Jonas Coch. 2019. Elm-search.https://klaftertief.github.io/elm-search/.Google ScholarGoogle Scholar
  5. Raoul-Gabriel Urma and Alan Mycroft. 2015. Source-code queries with graph databases-with application to program-ming language usage and evolution. Science of Computer Programming 97 (2015), 127--134.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Vladimir I Levenshtein. 1966. Binary codes capable of correcting deletions, insertions, and reversals. In Soviet physics doklady, Vol. 10. 707--710.Google ScholarGoogle Scholar
  7. Alberto Martelli and Ugo Montanari. 1982. An efficient uni-fication algorithm. ACM Transactions on Programming Lan-guages and Systems (TOPLAS) 4, 2 (1982), 258--282.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. John Alan Robinson et al. 1965. A machine-oriented logic based on the resolution principle. J. ACM 12, 1 (1965), 23--41.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Paul N. Hilfinger. 2019. Lecture 22: Type Inference and Uni-fication. https://inst.eecs.berkeley.edu/~cs164/sp11/lectures/ lecture22.pdfGoogle ScholarGoogle Scholar
  10. Eli Bendersky. 2018. Unification - Eli Bendersky's website. https://eli.thegreenplace.net/2018/unification.Google ScholarGoogle Scholar
  11. Peter Norvig. 1991. Correcting a widespread error in unifi-cation algorithms. Software: Practice and Experience 21, 2 (1991), 231--233.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Michael S Paterson and Mark N Wegman. 1978. Linear unification. J. Comput. System Sci. 16, 2 (1978), 158--167.Google ScholarGoogle ScholarCross RefCross Ref
  13. J Alan Robinson. 1971. Computational logic: The unification computation. Machine intelligence 6 (1971), 63--72Google ScholarGoogle Scholar

Index Terms

  1. A Novel Type-based API Search Engine for Open Source Elm Packages

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Other conferences
        CSAI '19: Proceedings of the 2019 3rd International Conference on Computer Science and Artificial Intelligence
        December 2019
        370 pages
        ISBN:9781450376273
        DOI:10.1145/3374587

        Copyright © 2019 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 4 March 2020

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed limited
      • Article Metrics

        • Downloads (Last 12 months)1
        • Downloads (Last 6 weeks)0

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader