skip to main content
10.1145/1292520.1292524acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Introducing records by refactoring

Published:05 October 2007Publication History

ABSTRACT

This paper focuses on introducing a new transformation to our existing model for refactoring Erlang programs. The goal of the transformation is to introduce a new abstraction level in data representation by substituting a group ofrelated data with a record. Using records enhances the legibility of the source code, makes further development easier, and makes programming less error-prone by providing better possibilities for both compilation time and runtime checks. There is a strong industrial demand for such a transformation in refactoring legacy code.

Erlang is a dynamically typed language, and many of its semantical rules are also dynamic. Therefore the main challenge in this research is to ensure the safety of statically performed refactoring steps.

References

  1. Fowler, M., Beck, K., Brant, J., Opdyke,W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison-Wesley (1999) Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Beck, K.: Extreme Programming Explained. Addison-Wesley (1999) Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Martin Fowler's refactoring site. (http://www.refactoring.com/)Google ScholarGoogle Scholar
  4. Li, H., Thompson, S., Reinke, C.: The Haskell Refactorer, HaRe, and its API. Electronic Notes in Theoretical Computer Science 141(4) (2005) 29--34 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Szabó-Nacsa, R., Diviánszky, P., Horváth, Z.: Prototype environment for refactoring Clean programs. In: The Fourth Conference of PhD Students in Computer Science (CSCS 2004), Vol. of extended abstracts, Szeged, Hungary (2004) p. 113. (full paper is available at: http://aszt.inf.elte.hu/~fun ver/, 10 pages).Google ScholarGoogle Scholar
  6. Lövei, L., Horváth, Z., Kozsik, T., Víg, A., Nagy, T.: Refactoring Erlang programs. To appear in: Periodica Polytechnica - Electrical Engineering (2007) 19 pages.Google ScholarGoogle Scholar
  7. Li, H., Thompson, S., Lövei, L., Horváth, Z., Kozsik, T., Víg, A., Nagy, T.: Refactoring Erlang programs. In: The Proceedings of 12th International Erlang/OTP User Conference, Stockholm, Sweden (2006) http://www.erlang.se/euc/06/, 10 pages.Google ScholarGoogle Scholar
  8. Armstrong, J., Virding, R., Williams, M., Wikstrom, C.: Concurrent Programming in Erlang. Prentice Hall (1996) Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Armstrong, J.: Making reliable distributed systems in the presence of software errors. PhD thesis, The Royal Institute of Technology, Stockholm, Sweden (2003)Google ScholarGoogle Scholar
  10. Barklund, J., Virding, R.: Erlang Reference Manual. (1999) Available from http://www.erlang.org/download/erl spec47.ps.gz.Google ScholarGoogle Scholar
  11. Lövei, L., Horváth, Z., Kozsik, T., Víg, A., Nagy, T.: Static rules for variable scoping in Erlang. To appear in: The 7th International Conference on Applied Informatics, Eger, Hungary, 2007.Google ScholarGoogle Scholar
  12. Kozsik, T.: Tutorial on subtype marks. In: Proceedings of the Central-European Functional Programming School (CEFP'05). Volume 4164 of LNCS., Springer-Verlag (2006) 191--222Google ScholarGoogle ScholarCross RefCross Ref
  13. Lindahl, T., Sagonas, K.: TypEr: a type annotator of Erlang code. In: ERLANG'05: Proceedings of the 2005 ACM SIGPLAN workshop on Erlang, Tallinn, Estonia, ACM Press, New York (2005) 17--25 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Nagy, T., Víg, A.: Erlang refactor tool. Master thesis, Eötvös Loránd University, Budapest, Hungary, 2007.Google ScholarGoogle Scholar
  15. Horváth, Z. et al.: Refactoring Erlang Programs. http://plc.inf.elte.hu/erlang/Google ScholarGoogle Scholar
  16. Mens, T., Tourwe, T.: A survey of software refactoring. IEEE Transactions on Software Engineering 30(2) (2004) 126--139 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Roberts, D., Brant, J., Johnson, R.: A refactoring tool for Smalltalk. Theory and Practice of Object Systems (TAPOS) 3(4) (1997) 253--263 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Diviánszky, P., Szabó-Nacsa, R., Horváth, Z.: Refactoring via database representation. In Cs&3246;ke et al., L., ed.: The Sixth International Conference on Applied Informatics (ICAI 2004), Eger, Hungary (2004) 129--135Google ScholarGoogle Scholar

Index Terms

  1. Introducing records by refactoring

    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 '07: Proceedings of the 2007 SIGPLAN workshop on ERLANG Workshop
      October 2007
      106 pages
      ISBN:9781595936752
      DOI:10.1145/1292520

      Copyright © 2007 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: 5 October 2007

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      ERLANG '07 Paper Acceptance Rate11of15submissions,73%Overall Acceptance Rate51of68submissions,75%

      Upcoming Conference

      ICFP '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader