Skip to main content

Micropatterns in Grammars

  • Conference paper
Software Language Engineering (SLE 2013)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8225))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. Beck, K.: Smalltalk. Best Practice Patterns. Prentice Hall (1996)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. Chomsky, N.: Syntactic Structures. Mouton (1957)

    Google Scholar 

  6. Chomsky, N.: On Certain Formal Properties of Grammars. Information and Control 2(2), 137–167 (1959)

    Article  MathSciNet  MATH  Google Scholar 

  7. Č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)

    Google Scholar 

  8. 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)

    Google Scholar 

  9. 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)

    Chapter  Google Scholar 

  10. 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)

    Chapter  Google Scholar 

  11. Fowler, M.: Patterns of Enterprise Application Architecture. Addison-Wesley Professional (2002)

    Google Scholar 

  12. Fowler, M.: Domain Specific Languages. Addison-Wesley Professional (2010)

    Google Scholar 

  13. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley (1995)

    Google Scholar 

  14. Gil, J., Maman, I.: Micro Patterns in Java Code. In: Proceedings of OOPSLA 2005, pp. 97–116. ACM (2005)

    Google Scholar 

  15. Greibach, S.A.: A New Normal-Form Theorem for Context-Free Phrase Structure Grammars. Journal of the ACM 12(1), 42–52 (1965)

    Article  MathSciNet  MATH  Google Scholar 

  16. Hoare, C.A.R.: Hints on Programming Language Design. Technical report, Stanford University, Stanford, CA, USA (1973)

    Google Scholar 

  17. Johnson, S.C.: YACC—Yet Another Compiler Compiler. Computer Science Technical Report 32, AT&T Bell Laboratories, Murray Hill, New Jersey (1975)

    Google Scholar 

  18. de Jonge, M., Monajemi, R.: Cost-Effective Maintenance Tools for Proprietary Languages. In: Proceedings of ICSM 2001, pp. 240–249. IEEE (2001)

    Google Scholar 

  19. Kleppe, A.: Software Language Engineering: Creating Domain-Specific Languages Using Metamodels. Addison-Wesley Professional (2008)

    Google Scholar 

  20. 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)

    Article  Google Scholar 

  21. 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)

    Google Scholar 

  22. Lämmel, R.: Grammar Adaptation. In: Oliveira, J.N., Zave, P. (eds.) FME 2001. LNCS, vol. 2021, pp. 550–570. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  23. Lämmel, R., Verhoef, C.: Semi-automatic Grammar Recovery. Software—Practice & Experience 31(15), 1395–1438 (2001)

    Article  MATH  Google Scholar 

  24. 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)

    Google Scholar 

  25. Lämmel, R., Zaytsev, V.: Recovering Grammar Relationships for the Java Language Specification. Software Quality Journal (SQJ) 19(2), 333–378 (2011)

    Article  Google Scholar 

  26. 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)

    Google Scholar 

  27. Mernik, M., Heering, J., Sloane, A.M.: When and How to Develop Domain-Specific Languages. ACM Computing Surveys 37(4), 316–344 (2005)

    Article  Google Scholar 

  28. 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)

    Article  Google Scholar 

  29. 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)

    Google Scholar 

  30. 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

  31. van Wijngaarden, A.: Orthogonal Design and Description of a Formal Language. In: MR, vol. 76. SMC (1965)

    Google Scholar 

  32. Wile, D.S.: Abstract Syntax from Concrete Syntax. In: ICSE, pp. 472–480. ACM (1997)

    Google Scholar 

  33. Wirth, N.: On the Design of Programming Languages. In: IFIP Congress, pp. 386–393 (1974)

    Google Scholar 

  34. Wirth, N.: What Can We Do about the Unnecessary Diversity of Notation for Syntactic Definitions? Communications of the ACM 20(11), 822–823 (1977)

    Article  Google Scholar 

  35. Zaytsev, V.: MediaWiki Grammar Recovery. Computing Research Repository (CoRR) 4661, 1–47 (2011)

    Google Scholar 

  36. 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)

    Google Scholar 

  37. Zaytsev, V.: Notation-Parametric Grammar Recovery. In: Sloane, A., Andova, S. (eds.) Post-Proceedings of LDTA 2012, ACM (June 2012)

    Google Scholar 

  38. Zaytsev, V.: The Grammar Hammer of 2012. Computing Research Repository (CoRR) 4446, 1–32 (2012)

    Google Scholar 

  39. 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)

    Google Scholar 

  40. Zaytsev, V.: Guided Grammar Convergence. In: Poster Proceedings of the Sixth International Conference on Software Language Engineering (SLE 2013) (2013) (to appear in CEUR)

    Google Scholar 

  41. 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)

    Chapter  Google Scholar 

  42. Zaytsev, V., Lämmel, R., van der Storm, T., Renggli, L., Wachsmuth, G.: Software Language Processing Suite6 (2008-2013), http://slps.github.io

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics