Abstract
Regular expressions are widely used, but they are inherently hard to understand and (re)use, which is primarily due to the lack of abstraction mechanisms that causes regular expressions to grow large very quickly. The problems with understandability and usability are further compounded by the viscosity, redundancy, and terseness of the notation. As a consequence, many different regular expressions for the same problem are floating around, many of them erroneous, making it quite difficult to find and use the right regular expression for a particular problem. Due to the ubiquitous use of regular expressions, the lack of understandability and usability becomes a serious software engineering problem.
In this paper we present a range of independent, complementary representations that can serve as explanations of regular expressions. We provide methods to compute those representations, and we describe how these methods and the constructed explanations can be employed in a variety of usage scenarios. In addition to aiding understanding, some of the representations can also help identify faults in regular expressions. Our evaluation shows that our methods are widely applicable and can thus have a significant impact in improving the practice of software engineering.
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
Blackwell, A.F.: See What You Need: Helping End-users to Build Abstractions. J. Visual Languages and Computing 12(5), 475–499 (2001)
Blackwell, A.F., Green, T.R.: Notational Systems - The Cognitive Dimensions of Notations Framework. In: HCI Models, Theories, and Frameworks: Toward and Interdisciplinary Science, pp. 103–133 (2003)
Boroditsky, L.: Metaphoric structuring: understanding time through spatial metaphors. Cognition 75(1), 1–28 (2000)
Bransford, J.D., Johnson, M.K.: Contextual prerequisites for understanding: Some investigations of comprehension and recall. J. Verbal Learning and Verbal Behavior 11(6), 717–726 (1972)
Budiselic, I., Srbljic, S., Popovic, M.: RegExpert: A Tool for Visualization of Regular Expressions. In: EUROCON 2007. The Computer as a Tool, pp. 2387–2389 (2007)
Graphrex, http://crotonresearch.com/graphrex/
Curcio, F., Robbins, O., Ela, S.S.: The Role of Body Parts and Readiness in Acquisition of Number Conservation. Child Development 42, 1641–1646 (1971)
Derek, M.J.: The New C Standard: An Economic and Cultural Commentary. Addison-Wesley Professional (2003)
Erwig, M., Walkingshaw, E.: A Visual Language for Representing and Explaining Strategies in Game Theory. In: IEEE Int. Symp. on Visual Languages and Human-Centric Computing. pp. 101–108 (2008)
Erwig, M., Walkingshaw, E.: Visual Explanations of Probabilistic Reasoning. In: IEEE Int. Symp. on Visual Languages and Human-Centric Computing, pp. 23–27 (2009)
Friedl, J.: Now you have two problems, http://regex.info/blog/2006-09-15/247
Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation, 3rd edn. Addison-Wesley Longman Publishing Co., Inc. (2006)
Hosoya, H., Vouillon, J., Pierce, B.C.: Regular Expression Types for XML. In: Proc. of the International Conf. on Functional Programming (ICFP), pp. 11–22 (2000)
Hur, J., Schuyler, A.D., States, D.J., Feldman, E.L.: SciMiner: web-based literature mining tool for target identification and functional enrichment analysis. Bioinformatics (Oxford, England) 25(6), 838–840 (2009)
Lockwood, J.W., Moscola, J., Kulig, M., Reddick, D., Brooks, T.: Internet Worm and Virus Protection in Dynamically Reconfigurable Hardware. In: Military and Aerospace Programmable Logic Device (MAPLD), p. 10 (2003)
Mahalingam, K., Bagasra, O.: Bioinformatics Tools: Searching for Markers in DNA/RNA Sequences. In: BIOCOMP, pp. 612–615 (2008)
Miller, R.C., Myers, B.A.: Lightweight Structured Text Processing. In: USENIX Annual Technical Conf., pp. 131–144 (1999)
Nakata, A., Higashino, T., Taniguchi, K.: Protocol synthesis from context-free processes using event structures. In: Int. Conf. on Real-Time Computing Systems and Applications, pp. 173–180 (1998)
Pike, R.: Structural Regular Expressions. In: EUUG Spring Conf., pp. 21–28 (1987)
Regular Expressions, http://en.wikipedia.org/wiki/Regular_expression
Sanfilippo, L., Voorhis, J.V.: Categorizing Event Sequences Using Regular Expressions. IASSIST Quarterly 21(3), 36–41 (1997)
Scaffidi, C., Myers, B., Shaw, M.: Topes: reusable abstractions for validating data. In: Int. Conf. on Software Engineering, pp. 1–10 (2008)
Steele, O.: http://osteele.com/tools/rework/
Wondracek, G., Comparetti, P.M., Kruegel, C., Kirda, E.: Automatic Network Protocol Analysis. In: Annual Network and Distributed System Security Symp., NDSS 2008 (2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Erwig, M., Gopinath, R. (2012). Explanations for Regular Expressions. In: de Lara, J., Zisman, A. (eds) Fundamental Approaches to Software Engineering. FASE 2012. Lecture Notes in Computer Science, vol 7212. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-28872-2_27
Download citation
DOI: https://doi.org/10.1007/978-3-642-28872-2_27
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-28871-5
Online ISBN: 978-3-642-28872-2
eBook Packages: Computer ScienceComputer Science (R0)