Abstract
Refactoring is a technique for improving the design of existing programs without changing their behaviour. Wrangler is a tool built at the University of Kent to support Erlang program refactoring; the Wrangler tool is written in Erlang.
In this paper we present the use of a novel testing tool, Quviq QuickCheck, for testing the implementation of Wrangler. QuickCheck is a specification-based testing tool for Erlang. With QuickCheck, programs are tested by writing properties in a restricted logic, and using the tool these properties are tested in randomly generated test cases.
This paper first gives overviews of Wrangler and Quviq QuickCheck, then discusses the various ways in which refactorings can be validated, and finally shows how QuickCheck can be used to test the correctness of refactorings in an efficient way.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Armstrong, J., Virding, R., Wikström, C., Williams, M.: Concurrent Programming in Erlang. 2nd edn. Prentice-Hall, Englewood Cliffs (1996)
Arts, T., Hughes, J., Johansson, J., Wiger, U.: Testing Telecoms Software with Quviq QuickCheck. In: Trinder, P. (ed.) Proceedings of the Fifth ACM SIGPLAN Erlang Workshop. ACM Press, New York (2006)
Carlsson, R., Rémond, M.: Eunit: a lightweight unit testing framework for erlang. In: ERLANG 2006: Proceedings of the 2006 ACM SIGPLAN workshop on Erlang, p. 1. ACM Press, New York (2006)
Claessen, K., Hughes, J.: QuickCheck: a Lightweight Tool for Random Testing of Haskell Programs. ACM SIGPLAN Notices 35(9), 268–279 (2000)
Daniel, B., Dig, D., Garcia, K., Marinov, D.: Automated testing of refactoring engines. In: ESEC/FSE 2007: Proceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering, September 2007. ACM Press, New York (2007)
FORSE. Formally-Based Tool Support for Erlang Development, http://www.cs.kent.ac.uk/projects/forse/
Fowler, M.: Refactoring Home Page, http://www.refactoring.com
Hughes, J.: QuickCheck Testing for Fun and Profit. In: Hanus, M. (ed.) PADL 2007. LNCS, vol. 4354, pp. 1–32. Springer, Heidelberg (2006)
Li, H.: Refactoring Haskell Programs. PhD thesis, Computing Laboratory, University of Kent, Canterbury, Kent, UK (September 2006)
Li, H., Reinke, C., Thompson, S.: Tool Support for Refactoring Functional Programs. In: Jeuring, J. (ed.) ACM SIGPLAN Haskell Workshop, Uppsala, Sweden (August 2003)
Li, H., Thompson, S.: A Comparative Study of Refactoring Haskell and Erlang Programs. In: Di Penta, M., Moonen, L. (eds.) Sixth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM 2006), September 2006, pp. 197–206. IEEE, Los Alamitos (2006)
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 (November 2006)
Gorrie, L.: Distel: Distributed Emacs Lisp (for Erlang). In: Eighth International Erlang/OTP User Conference
Carlsson, R.: Erlang Syntax Tools, http://www.erlang.org/doc/doc-5.4.12/lib/syntax_tools-1.4.3
Sultana, N.: Verification of Refactorings in Isabelle/HOL. Master’s thesis, Computing Laboratory, University of Kent, UK (September 2007)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Li, H., Thompson, S. (2008). Testing Erlang Refactorings with QuickCheck. In: Chitil, O., Horváth, Z., Zsók, V. (eds) Implementation and Application of Functional Languages. IFL 2007. Lecture Notes in Computer Science, vol 5083. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-85373-2_2
Download citation
DOI: https://doi.org/10.1007/978-3-540-85373-2_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-85372-5
Online ISBN: 978-3-540-85373-2
eBook Packages: Computer ScienceComputer Science (R0)