Micropatterns in Grammars

  • Vadim Zaytsev
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8225)

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. 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. 3.
    Beck, K.: Smalltalk. Best Practice Patterns. Prentice Hall (1996)Google Scholar
  4. 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. 5.
    Chomsky, N.: Syntactic Structures. Mouton (1957)Google Scholar
  6. 6.
    Chomsky, N.: On Certain Formal Properties of Grammars. Information and Control 2(2), 137–167 (1959)MathSciNetCrossRefMATHGoogle Scholar
  7. 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. 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. 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)CrossRefGoogle Scholar
  10. 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)CrossRefGoogle Scholar
  11. 11.
    Fowler, M.: Patterns of Enterprise Application Architecture. Addison-Wesley Professional (2002)Google Scholar
  12. 12.
    Fowler, M.: Domain Specific Languages. Addison-Wesley Professional (2010)Google Scholar
  13. 13.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley (1995)Google Scholar
  14. 14.
    Gil, J., Maman, I.: Micro Patterns in Java Code. In: Proceedings of OOPSLA 2005, pp. 97–116. ACM (2005)Google Scholar
  15. 15.
    Greibach, S.A.: A New Normal-Form Theorem for Context-Free Phrase Structure Grammars. Journal of the ACM 12(1), 42–52 (1965)MathSciNetCrossRefMATHGoogle Scholar
  16. 16.
    Hoare, C.A.R.: Hints on Programming Language Design. Technical report, Stanford University, Stanford, CA, USA (1973)Google Scholar
  17. 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. 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. 19.
    Kleppe, A.: Software Language Engineering: Creating Domain-Specific Languages Using Metamodels. Addison-Wesley Professional (2008)Google Scholar
  20. 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)CrossRefGoogle Scholar
  21. 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. 22.
    Lämmel, R.: Grammar Adaptation. In: Oliveira, J.N., Zave, P. (eds.) FME 2001. LNCS, vol. 2021, pp. 550–570. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  23. 23.
    Lämmel, R., Verhoef, C.: Semi-automatic Grammar Recovery. Software—Practice & Experience 31(15), 1395–1438 (2001)CrossRefMATHGoogle Scholar
  24. 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. 25.
    Lämmel, R., Zaytsev, V.: Recovering Grammar Relationships for the Java Language Specification. Software Quality Journal (SQJ) 19(2), 333–378 (2011)CrossRefGoogle Scholar
  26. 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. 27.
    Mernik, M., Heering, J., Sloane, A.M.: When and How to Develop Domain-Specific Languages. ACM Computing Surveys 37(4), 316–344 (2005)CrossRefGoogle Scholar
  28. 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)CrossRefGoogle Scholar
  29. 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. 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. 31.
    van Wijngaarden, A.: Orthogonal Design and Description of a Formal Language. In: MR, vol. 76. SMC (1965)Google Scholar
  32. 32.
    Wile, D.S.: Abstract Syntax from Concrete Syntax. In: ICSE, pp. 472–480. ACM (1997)Google Scholar
  33. 33.
    Wirth, N.: On the Design of Programming Languages. In: IFIP Congress, pp. 386–393 (1974)Google Scholar
  34. 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)CrossRefGoogle Scholar
  35. 35.
    Zaytsev, V.: MediaWiki Grammar Recovery. Computing Research Repository (CoRR) 4661, 1–47 (2011)Google Scholar
  36. 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. 37.
    Zaytsev, V.: Notation-Parametric Grammar Recovery. In: Sloane, A., Andova, S. (eds.) Post-Proceedings of LDTA 2012, ACM (June 2012)Google Scholar
  38. 38.
    Zaytsev, V.: The Grammar Hammer of 2012. Computing Research Repository (CoRR) 4446, 1–32 (2012)Google Scholar
  39. 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. 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. 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)CrossRefGoogle Scholar
  42. 42.
    Zaytsev, V., Lämmel, R., van der Storm, T., Renggli, L., Wachsmuth, G.: Software Language Processing Suite6 (2008-2013), http://slps.github.io

Copyright information

© Springer International Publishing Switzerland 2013

Authors and Affiliations

  • Vadim Zaytsev
    • 1
  1. 1.Software Analysis & Transformation Team (SWAT)Centrum Wiskunde & Informatica (CWI)The Netherlands

Personalised recommendations