skip to main content
10.1145/3546186.3549929acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

InfERL: scalable and extensible Erlang static analysis

Published:06 September 2022Publication History

ABSTRACT

In this paper we introduce InfERL, an open source, scalable, and extensible static analyzer for Erlang, based on Meta’s Infer tool. InfERL has been developed at WhatsApp and it is deployed to regularly scan WhatsApp server’s Erlang code- base, detecting reliability issues and checking user-defined properties. The paper describes the Erlang specific technical challenges we had to address and our design choices. We also report on our experience in running InfERL on Erlang code at scale, supporting the messaging app used everyday by over 2 billion people.

References

  1. Nadia Alshahwan, Xinbo Gao, Mark Harman, Yue Jia, Ke Mao, Alexander Mols, Taijin Tei, and Ilya Zorin. 2018. Deploying Search Based Software Engineering with Sapienz at Facebook. In Search-Based Software Engineering (Lecture Notes in Computer Science, Vol. 11036 ), Thelma Elita Colanzi and Phil McMinn (Eds.). Springer, 3-45. https://doi.org/10.1007/978-3-319-99241-9_1 Google ScholarGoogle ScholarCross RefCross Ref
  2. Amazon. 2021. Amazon CodeGuru now includes recommendations powered by Infer. http://aws.amazon.com/about-aws/whatsnew/2021/10/amazon-codeguru-recommendations-infer/. Online, accessed 29 July 2022. Google ScholarGoogle Scholar
  3. Josh Berdine, Cristiano Calcagno, and Peter W. O'Hearn. 2005. Smallfoot: Modular Automatic Assertion Checking with Separation Logic. In Formal Methods for Components and Objects (Lecture Notes in Computer Science, Vol. 4111 ), Frank S. de Boer, Marcello M. Bonsangue, Susanne Graf, and Willem P. de Roever (Eds.). Springer, 115-137. https://doi.org/10.1007/11804192_6 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Cristiano Calcagno and Dino Distefano. 2011. Infer: An Automatic Program Verifier for Memory Safety of C Programs. In NASA Formal Methods (Lecture Notes in Computer Science, Vol. 6617 ), Mihaela Gheorghiu Bobaru, Klaus Havelund, Gerard J. Holzmann, and Rajeev Joshi (Eds.). Springer, 459-465. https://doi.org/10.1007/978-3-642-20398-5_33 Google ScholarGoogle ScholarCross RefCross Ref
  5. Cristiano Calcagno, Dino Distefano, Jérémy Dubreil, Dominik Gabi, Pieter Hooimeijer, Martino Luca, Peter W. O'Hearn, Irene Papakonstantinou, Jim Purbrick, and Dulma Rodriguez. 2015. Moving Fast with Software Verification. In NASA Formal Methods (Lecture Notes in Computer Science, Vol. 9058 ), Klaus Havelund, Gerard J. Holzmann, and Rajeev Joshi (Eds.). Springer, 3-11. https://doi.org/10.1007/978-3-319-17524-9_1 Google ScholarGoogle ScholarCross RefCross Ref
  6. Cristiano Calcagno, Dino Distefano, Peter W. O'Hearn, and Hongseok Yang. 2009. Compositional shape analysis by means of bi-abduction. In Proceedings of the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Zhong Shao and Benjamin C. Pierce (Eds.). ACM, 289-300. https://doi.org/10.1145/1480881.1480917 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Maria Christakis and Christian Bird. 2016. What developers want and need from program analysis: An empirical study. In Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, David Lo, Sven Apel, and Sarfraz Khurshid (Eds.). ACM, 332-343. https://doi.org/10.1145/2970276.2970347 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Dino Distefano, Manuel Fähndrich, Francesco Logozzo, and Peter W. O'Hearn. 2019. Scaling static analyses at Facebook. Commun. ACM 62, 8 ( 2019 ), 62-70. https://doi.org/10.1145/3338112 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Radu Grigore, Dino Distefano, Rasmus Lerchedahl Petersen, and Nikos Tzevelekos. 2013. Runtime Verification Based on Register Automata. In Tools and Algorithms for the Construction and Analysis of Systems (Lecture Notes in Computer Science, Vol. 7795 ), Nir Piterman and Scott A. Smolka (Eds.). Springer, 260-276. https://doi.org/10.1007/978-3-642-36742-7_19 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. A. R. Hoare. 1969. An Axiomatic Basis for Computer Programming. Commun. ACM 12, 10 ( 1969 ), 576-580. https://doi.org/10.1145/363235. 363259 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Brittany Johnson, Yoonki Song, Emerson R. Murphy-Hill, and Robert W. Bowdidge. 2013. Why don't software developers use static analysis tools to find bugs?. In Proceedings of the 35th International Conference on Software Engineering, David Notkin, Betty H. C. Cheng, and Klaus Pohl (Eds.). IEEE, 672-681. https://doi.org/10.1109/ICSE. 2013.6606613 Google ScholarGoogle ScholarCross RefCross Ref
  12. Tobias Lindahl and Konstantinos Sagonas. 2004. Detecting Software Defects in Telecom Applications Through Lightweight Static Analysis: A War Story. In Programming Languages and Systems (Lecture Notes in Computer Science, Vol. 3302 ), Wei-Ngan Chin (Ed.). Springer, 91-106. https://doi.org/10.1007/978-3-540-30477-7_7 Google ScholarGoogle ScholarCross RefCross Ref
  13. Tobias Lindahl and Konstantinos Sagonas. 2006. Practical type inference based on success typings. In Proceedings of the 8th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, Annalisa Bossi and Michael J. Maher (Eds.). ACM, 167-178. https://doi.org/10.1145/1140335.1140356 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Ke Mao, Timotej Kapus, Lambros Petrou, Ákos Hajdu, Matteo Marescotti, Andreas Löscher, Mark Harman, and Dino Distefano. 2022. FAUSTA: Scaling Dynamic Analysis with Trafic Generation at WhatsApp. In Proceedings of 15th IEEE Conference on Software Testing, Verification and Validation. IEEE, 267-278. https://doi.org/10.1109/ ICST53961. 2022.00036 Google ScholarGoogle ScholarCross RefCross Ref
  15. Azalea Raad, Josh Berdine, Hoang-Hai Dang, Derek Dreyer, Peter W. O'Hearn, and Jules Villard. 2020. Local Reasoning About the Presence of Bugs: Incorrectness Separation Logic. In Computer Aided Verification, Shuvendu K. Lahiri and Chao Wang (Eds.). Lecture Notes in Computer Science, Vol. 12225. Springer, 225-252. https://doi.org/10.1007/978-3-030-53291-8_14 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Franco Raimondi and Bor-Yuh Evan Chang. 2021. How automated reasoning improves the Prime Video experience. http://amazon.science/blog/how-automated-reasoning-improvesthe-prime-video-experience. Online, accessed 29 July 2022. Google ScholarGoogle Scholar
  17. John C. Reynolds. 1972. Definitional interpreters for higher-order programming languages. In Proceedings of the ACM annual conference, Volume 2, John J. Donovan and Rosemary Shields (Eds.). ACM, 717-740. https://doi.org/10.1145/800194.805852 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Xin S. 2020. Infer#: Interprocedural Memory Safety Analysis For C#. http://devblogs.microsoft.com/dotnet/infer-interproceduralmemory-safety-analysis-for-c/. Online, accessed 29 July 2022. Google ScholarGoogle Scholar
  19. Josef Svenningsson. 2022. Gradualizer. https://github.com/josefs/Gradualizer. Online, accessed 29 July 2022. Google ScholarGoogle Scholar

Index Terms

  1. InfERL: scalable and extensible Erlang static analysis

    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 Conferences
      Erlang 2022: Proceedings of the 21st ACM SIGPLAN International Workshop on Erlang
      September 2022
      46 pages
      ISBN:9781450394352
      DOI:10.1145/3546186

      Copyright © 2022 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 the author(s) 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: 6 September 2022

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate51of68submissions,75%

      Upcoming Conference

      ICFP '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader