Abstract
We propose a bidirectional collaboration between declarative debugging and testing for detecting errors in the sequential subset of the programming language Erlang. In our proposal, the information obtained from the user during a debugging session is stored in form of unit tests. These test cases can be employed afterwards to check, through testing, if the bug has been actually corrected. Moreover, the debugger employs already existing tests to determine the correctness of some subcomputations, helping the user to locate the error readily. The process, contrarily to usual debugger frameworks is cumulative: if later we find a new bug we have more information from the previous debugging and testing iterations that can contribute to find the error readily.
Research supported by the Comunidad de Madrid project N-Greens Software-CM (S2013/ICE-2731), by the MINECO Spanish projects StrongSoft (TIN2012-39391-C04-04), VIVAC (TIN2012-38137), CAVI-(ROSE/ART) (TIN2013-44742-C4-(1/3)-R), LOBASS (TIN2015-69175-C4-2-R), and TRACES (TIN2015-67522-C3-3-R), and by the European Union project POLCA (STREP FP7-ICT-2013.3.4 610686).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Erlang also supports test cases ?assert(...) with predicates. Our system can handle these test cases when their predicates involve equality or inequality operators, but we will focus only on ?assertEqual and ?assertNotEqual for simplicity in the presentation.
- 2.
The positive test case, if exists, indicates that the initial symptom is wrong indicating also the expected value. This makes the addition of the negative test case redundant.
- 3.
Nodes’ modules are not shown for the sake of clarity.
- 4.
References
Alexander, I.F., Maiden, N.: Scenarios, Stories, Use Cases: Through the Systems Development Life-cycle. Wiley, New York (2005)
Barr, E., Harman, M., McMinn, P., Shahbaz, M., Yoo, S.: The oracle problem in software testing: a survey. IEEE Trans. Softw. Eng. 41(5), 507–525 (2015)
Caballero, R., Martin-Martin, E., Riesco, A., Tamarit, S.: EDD: a declarative debugger for sequential erlang programs. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014 (ETAPS). LNCS, vol. 8413, pp. 581–586. Springer, Heidelberg (2014)
Caballero, R., Martin-Martin, E., Riesco, A., Tamarit, S.: A zoom-declarative debugger for sequential Erlang programs. Sci. Comput. Program. 110, 104–118 (2015)
Carlsson, R., Rémond, M.: EUnit: a lightweight unit testing framework for Erlang. In: Proceedings of the 2006 ACM SIGPLAN Workshop on Erlang, ERLANG 2006, p. 1. ACM, New York (2006)
Cesarini, F., Thompson, S.: Programming Erlang: A Concurrent Approach to Software Development. O’Reilly Media Inc., Beijing (2009)
Hebert, F.: Learn You Some Erlang for Great Good!: A Beginner’s Guide. No Starch Press (2013). http://learnyousomeerlang.com
Papadakis, M., Sagonas, K.: A PropEr integration of types and function specifications with property-based testing. In: Proceedings of the 2011 ACM SIGPLAN Erlang Workshop, pp. 39–50. ACM Press (2011)
Shapiro, E.Y.: Algorithmic Program Debugging. ACM Distinguished Dissertation. MIT Press, Cambridge (1983)
Silva, J.: A survey on algorithmic debugging strategies. Adv. Eng. Softw. 42(11), 976–991 (2011)
Acknowledgments
We thank the anonymous reviewer of a previous work published in the journal Science of Computer Programming for suggesting us this line of work.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Tamarit, S., Riesco, A., Martin-Martin, E., Caballero, R. (2016). Debugging Meets Testing in Erlang. In: Aichernig, B., Furia, C. (eds) Tests and Proofs. TAP 2016. Lecture Notes in Computer Science(), vol 9762. Springer, Cham. https://doi.org/10.1007/978-3-319-41135-4_10
Download citation
DOI: https://doi.org/10.1007/978-3-319-41135-4_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-41134-7
Online ISBN: 978-3-319-41135-4
eBook Packages: Computer ScienceComputer Science (R0)