Abstract
Micropatterns and nanopatterns have been previously demonstrated to be useful techniques for object-oriented program comprehension. In this paper, we use a similar approach for identifying structurally similar fragments in grammars in a broad sense (contracts for commitment to structure), in particular parser specifications, metamodels and data models. Grammatical micropatterns bridge the gap between grammar metrics, which are easy to implement but hard to assign meaning to, and language design guidelines, which are inherently meaningful as stemming from current software language engineering practice but considerably harder to formalise.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Ammeraal, L.: On the Design of Programming Languages Including MINI ALGOL 68. In: Mühlbacher, J.R. (ed.) GI 1975. LNCS, vol. 34, pp. 500–504. Springer, Heidelberg (1975)
Batarseh, F.: Java Nano Patterns: A Set of Reusable Objects. In: Proceedings of the 48th Annual Southeast Regional Conference, SE 2010, pp. 60:1–60:4. ACM (2010)
Beck, K.: Smalltalk. Best Practice Patterns. Prentice Hall (1996)
Butler, S.: Mining Java Class Identifier Naming Conventions. In: Proceedings of the International Conference on Software Engineering, ICSE 2012, pp. 1641–1643. IEEE Press (2012)
Chomsky, N.: Syntactic Structures. Mouton (1957)
Chomsky, N.: On Certain Formal Properties of Grammars. Information and Control 2(2), 137–167 (1959)
Črepinšek, M., Kosar, T., Mernik, M., Cervelle, J., Forax, R., Roussel, G.: On Automata and Language Based Grammar Metrics. Computer Science and Information Systems 7(2) (2010)
van Emde Boas, P.: Resistance is Futile; Formal Linguistic Observations on Design Patterns. Technical Report ILLC-CT-97-02, Institute for Logic, Language and Computation, University of Amsterdam (1997)
Fischer, B., Lämmel, R., Zaytsev, V.: Comparison of Context-Free Grammars Based on Parsing Generated Test Data. In: Sloane, A., Aßmann, U. (eds.) SLE 2011. LNCS, vol. 6940, pp. 324–343. Springer, Heidelberg (2012)
Florijn, G., Meijers, M., Winsen, P.: Tool Support for Object-Oriented Patterns. In: Akşit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 472–495. Springer, Heidelberg (1997)
Fowler, M.: Patterns of Enterprise Application Architecture. Addison-Wesley Professional (2002)
Fowler, M.: Domain Specific Languages. Addison-Wesley Professional (2010)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley (1995)
Gil, J., Maman, I.: Micro Patterns in Java Code. In: Proceedings of OOPSLA 2005, pp. 97–116. ACM (2005)
Greibach, S.A.: A New Normal-Form Theorem for Context-Free Phrase Structure Grammars. Journal of the ACM 12(1), 42–52 (1965)
Hoare, C.A.R.: Hints on Programming Language Design. Technical report, Stanford University, Stanford, CA, USA (1973)
Johnson, S.C.: YACC—Yet Another Compiler Compiler. Computer Science Technical Report 32, AT&T Bell Laboratories, Murray Hill, New Jersey (1975)
de Jonge, M., Monajemi, R.: Cost-Effective Maintenance Tools for Proprietary Languages. In: Proceedings of ICSM 2001, pp. 240–249. IEEE (2001)
Kleppe, A.: Software Language Engineering: Creating Domain-Specific Languages Using Metamodels. Addison-Wesley Professional (2008)
Klint, P., Lämmel, R., Verhoef, C.: Toward an Engineering Discipline for Grammarware. ACM Transactions on Software Engineering Methodology (ToSEM) 14(3), 331–380 (2005)
Klint, P., van der Storm, T., Vinju, J.: EASY meta-programming with rascal. In: Fernandes, J.M., Lämmel, R., Visser, J., Saraiva, J. (eds.) GTTSE 2009. LNCS, vol. 6491, pp. 222–289. Springer, Heidelberg (2011)
Lämmel, R.: Grammar Adaptation. In: Oliveira, J.N., Zave, P. (eds.) FME 2001. LNCS, vol. 2021, pp. 550–570. Springer, Heidelberg (2001)
Lämmel, R., Verhoef, C.: Semi-automatic Grammar Recovery. Software—Practice & Experience 31(15), 1395–1438 (2001)
Lämmel, R., Wachsmuth, G.: Transformation of SDF Syntax Definitions in the ASF+SDF Meta-Environment. In: Proceedings of LDTA 2001. ENTCS, vol. 44, Elsevier Science (2001)
Lämmel, R., Zaytsev, V.: Recovering Grammar Relationships for the Java Language Specification. Software Quality Journal (SQJ) 19(2), 333–378 (2011)
Lanza, M., Ducasse, S.: A Categorization of Classes based on the Visualization of their Internal Structure: The Class Blueprint. In: Northrop, L.M., Vlissides, J.M. (eds.) Proceedings of OOPSLA 2001, pp. 300–311. ACM (2001)
Mernik, M., Heering, J., Sloane, A.M.: When and How to Develop Domain-Specific Languages. ACM Computing Surveys 37(4), 316–344 (2005)
Power, J.F., Malloy, B.A.: A Metrics Suite for Grammar-based Software. Journal of Software Maintenance and Evolution: Research and Practice 16, 405–426 (2004)
Thies, A., Roth, C.: Recommending Rename Refactorings. In: Proceedings of the Second International Workshop on Recommendation Systems for Software Engineering, RSSE 2010, pp. 1–5. ACM (2010)
Völter, M., Benz, S., Dietrich, C., Engelmann, B., Helander, M., Kats, L.C.L., Visser, E., Wachsmuth, G.: DSL Engineering: Designing, Implementing and Using Domain-Specific Languages (2013), dslbook.org
van Wijngaarden, A.: Orthogonal Design and Description of a Formal Language. In: MR, vol. 76. SMC (1965)
Wile, D.S.: Abstract Syntax from Concrete Syntax. In: ICSE, pp. 472–480. ACM (1997)
Wirth, N.: On the Design of Programming Languages. In: IFIP Congress, pp. 386–393 (1974)
Wirth, N.: What Can We Do about the Unnecessary Diversity of Notation for Syntactic Definitions? Communications of the ACM 20(11), 822–823 (1977)
Zaytsev, V.: MediaWiki Grammar Recovery. Computing Research Repository (CoRR) 4661, 1–47 (2011)
Zaytsev, V.: BNF WAS HERE: What Have We Done About the Unnecessary Diversity of Notation for Syntactic Definitions. In: Ossowski, S., Lecca, P. (eds.) SAC/PL 2012, pp. 1910–1915. ACM (March 2012)
Zaytsev, V.: Notation-Parametric Grammar Recovery. In: Sloane, A., Andova, S. (eds.) Post-Proceedings of LDTA 2012, ACM (June 2012)
Zaytsev, V.: The Grammar Hammer of 2012. Computing Research Repository (CoRR) 4446, 1–32 (2012)
Zaytsev, V.: Grammar Zoo: A Repository of Experimental Grammarware. In: Fifth Special issue on Experimental Software and Toolkits of Science of Computer Programming (SCP EST5) (Currently under review after major revision 2013)
Zaytsev, V.: Guided Grammar Convergence. In: Poster Proceedings of the Sixth International Conference on Software Language Engineering (SLE 2013) (2013) (to appear in CEUR)
Zaytsev, V., Lämmel, R.: A Unified Format for Language Documents. In: Malloy, B., Staab, S., van den Brand, M. (eds.) SLE 2010. LNCS, vol. 6563, pp. 206–225. Springer, Heidelberg (2011)
Zaytsev, V., Lämmel, R., van der Storm, T., Renggli, L., Wachsmuth, G.: Software Language Processing Suite6 (2008-2013), http://slps.github.io
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer International Publishing Switzerland
About this paper
Cite this paper
Zaytsev, V. (2013). Micropatterns in Grammars. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds) Software Language Engineering. SLE 2013. Lecture Notes in Computer Science, vol 8225. Springer, Cham. https://doi.org/10.1007/978-3-319-02654-1_7
Download citation
DOI: https://doi.org/10.1007/978-3-319-02654-1_7
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-02653-4
Online ISBN: 978-3-319-02654-1
eBook Packages: Computer ScienceComputer Science (R0)