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

Gradual typing of erlang programs: a wrangler experience

Published: 27 September 2008 Publication History

Abstract

Currently most Erlang programs contain no or very little type information. This sometimes makes them unreliable, hard to use, and difficult to understand and maintain. In this paper we describe our experiences from using static analysis tools to gradually add type information to a medium sized Erlang application that we did not write ourselves: the code base of Wrangler. We carefully document the approach we followed, the exact steps we took, and discuss possible difficulties that one is expected to deal with and the effort which is required in the process. We also show the type of software defects that are typically brought forward, the opportunities for code refactoring and improvement, and the expected benefits from embarking in such a project. We have chosen Wrangler for our experiment because the process is better explained on a code base which is small enough so that the interested reader can retrace its steps, yet large enough to make the experiment quite challenging and the experiences worth writing about. However, we have also done something similar on large parts of Erlang/OTP. The result can partly be seen in the source code of Erlang/OTP R12B-3.

Supplementary Material

JPG File (1411284.jpg)
index.html (index.html)
Slides from the presentation
Audio only (1411284.mp3)
Video (1411284.mp4)

References

[1]
M. Jiménez, T. Lindahl, and K. Sagonas. A language for specifying type contracts in Erlang and its interaction with success typings. In Proceedings of the 2007 ACM SIGPLAN Erlang Workshop, pages 11--17, New York, NY, USA, Sept. 2007. ACM Press.
[2]
H. Li and S. Thompson. Testing Erlang refactorings with QuickCheck. In Pre-proceedings of Implementation of Functional Languages, Sept. 2007.
[3]
H. Li and S. Thompson. Tool support for refactoring functional programs. In Proceedings of the 2008 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 199--203. ACM Press, Jan. 2008.
[4]
T. Lindahl and K. Sagonas. Detecting software defects in telecom applications through lightweight static analysis: A war story. In C. Wei-Ngan, editor, Programming Languages and Systems: Proceedings of the Second Asian Symposium (APLAS'04), volume 3302 of LNCS, pages 91--106. Springer, Nov. 2004.
[5]
T. Lindahl and K. Sagonas. Practical type inference based on success typings. In Proceedings of the 8th ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming, pages 167--178, New York, NY, USA, 2006. ACM Press.

Cited By

View all
  • (2024)Same Same but Different: A Comparative Analysis of Static Type Checkers in ErlangProceedings of the 23rd ACM SIGPLAN International Workshop on Erlang10.1145/3677995.3678189(2-12)Online publication date: 28-Aug-2024
  • (2022)Set-theoretic Types for ErlangProceedings of the 34th Symposium on Implementation and Application of Functional Languages10.1145/3587216.3587220(1-14)Online publication date: 31-Aug-2022
  • (2020)A Gradual Type System for ElixirProceedings of the 24th Brazilian Symposium on Context-Oriented Programming and Advanced Modularity10.1145/3427081.3427084(17-24)Online publication date: 19-Oct-2020
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ERLANG '08: Proceedings of the 7th ACM SIGPLAN workshop on ERLANG
September 2008
96 pages
ISBN:9781605580654
DOI:10.1145/1411273
  • General Chair:
  • Tee Teoh,
  • Program Chair:
  • Zoltán Horváth
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 27 September 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. contracts
  2. dialyzer
  3. erlang
  4. software defect detection

Qualifiers

  • Research-article

Conference

ICFP08
Sponsor:

Acceptance Rates

ERLANG '08 Paper Acceptance Rate 9 of 10 submissions, 90%;
Overall Acceptance Rate 51 of 68 submissions, 75%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 02 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Same Same but Different: A Comparative Analysis of Static Type Checkers in ErlangProceedings of the 23rd ACM SIGPLAN International Workshop on Erlang10.1145/3677995.3678189(2-12)Online publication date: 28-Aug-2024
  • (2022)Set-theoretic Types for ErlangProceedings of the 34th Symposium on Implementation and Application of Functional Languages10.1145/3587216.3587220(1-14)Online publication date: 31-Aug-2022
  • (2020)A Gradual Type System for ElixirProceedings of the 24th Brazilian Symposium on Context-Oriented Programming and Advanced Modularity10.1145/3427081.3427084(17-24)Online publication date: 19-Oct-2020
  • (2014)QEMU/CPCProceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation10.1145/2543728.2543733(83-94)Online publication date: 11-Jan-2014
  • (2010)Using static analysis to detect type errors and concurrency defects in erlang programsProceedings of the 10th international conference on Functional and Logic Programming10.1007/978-3-642-12251-4_2(13-18)Online publication date: 19-Apr-2010
  • (2009)Towards mobility for Caml Light2009 First International Conference on Networked Digital Technologies10.1109/NDT.2009.5272180(315-320)Online publication date: Jul-2009
  • (2009)Design of A Concurrent Caml Light: ACCL2009 Second International Conference on the Applications of Digital Information and Web Technologies10.1109/ICADIWT.2009.5273977(262-267)Online publication date: Aug-2009

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media