Graceful Dialects

  • Michael Homer
  • Timothy Jones
  • James Noble
  • Kim B. Bruce
  • Andrew P. Black
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8586)

Abstract

Programming languages are enormously diverse, both in their essential concepts and in their accidental aspects. This creates a problem when teaching programming. To let students experience the diversity of essential concepts, the students must also be exposed to an overwhelming variety of accidental and irrelevant detail: the accidental differences between the languages are likely to obscure the teaching point.

The dialect system of the Grace programming language allows instructors to tailor and vary the language to suit their courses, while staying within the same stylistic, syntactic and semantic framework, as well as permitting authors to define advanced internal domain-specific languages. The dialect system achieves this power though a combination of well-known language features: lexical nesting, lambda expressions, multi-part method names, optional typing, and pluggable checkers. Grace’s approach to dialects is validated by a series of case studies, including both extensions and restrictions of the base language.

Keywords

Grace language variants domain-specific languages pluggable checkers graphical microworlds error reporting object-oriented programming 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Supplementary material

978-3-662-44202-9_6_MOESM1_ESM.zip (1420.9 mb)
Electronic Supplementary Material(118 KB)

References

  1. 1.
    Augustsson, L., Mansell, H., Sittampalam, G.: Paradise: a two-stage DSL embedded in Haskell. In: ICFP 2008, pp. 225–228. ACM, New York (2008)Google Scholar
  2. 2.
    Bierman, G.M., Meijer, E., Torgersen, M.: Lost in translation: formalizing proposed extensions to C#. In: OOPSLA (2007)Google Scholar
  3. 3.
    Black, A.P., Bruce, K.B., Homer, M., Noble, J.: Grace: the absence of (inessential) difficulty. In: Onward!, pp. 85–98. ACM, New York (2012)CrossRefGoogle Scholar
  4. 4.
    Black, A.P., Bruce, K.B., Homer, M., Noble, J., Ruskin, A., Yannow, R.: Seeking Grace: a new object-oriented language for novices. In: SIGCSE (2013)Google Scholar
  5. 5.
    Burmako, E., Odersky, M., Vogt, C., Zeiger, S., Moors, A.: Scala macros (April 2012), http://scalamacros.org
  6. 6.
    Culpepper, R., Tobin-Hochstadt, S., Flatt, M.: Advanced macrology and the implementation of Typed Scheme. In: ICFP Workshop on Scheme and Functional Programming (2007)Google Scholar
  7. 7.
    EPFL: Environment, universes, and mirrors - Scala documentation (2013), http://docs.scala-lang.org/overviews/reflection/environment-universes-mirrors.html
  8. 8.
    Findler, R.B., Clements, J., Flanagan, C., Flatt, M., Krishnamurthi, S., Steckler, P., Felleisen, M.: DrScheme: a programming environment for Scheme. J. Funct. Program. 12(2), 159–182 (2002)CrossRefMATHGoogle Scholar
  9. 9.
    Fowler, M.: Domain Specific Languages. AW (2011)Google Scholar
  10. 10.
    Gamma, E., Helm, R., Johnson, R.E., Vlissides, J.: Design Patterns. AW (1994)Google Scholar
  11. 11.
    Hoare, C.: Hints on programming language design. Tech. Rep. AIM-224, Stanford Artificial Intelligence Laboratory (1973)Google Scholar
  12. 12.
    Holt, R.C., Wortman, D.B.: A sequence of structured subsets of PL/I. SIGCSE Bull. 6(1), 129–132 (1974), http://doi.acm.org/10.1145/953057.810456 CrossRefGoogle Scholar
  13. 13.
    Homer, M.: Graceful Language Features and Interfaces. Ph.D. thesis, Victoria University of Wellington (2014)Google Scholar
  14. 14.
    Homer, M., Bruce, K.B., Noble, J., Black, A.P.: Modules as gradually-typed objects. In: Proceedings of the 7th Workshop on Dynamic Languages and Applications, DYLA 2013, pp. 1:1–1:8. ACM, New York (2013), http://doi.acm.org/10.1145/2489798.2489799
  15. 15.
    Homer, M., Noble, J., Bruce, K.B., Black, A.P., Pearce, D.J.: Patterns as objects in Grace. In: Dynamic Language Symposium. ACM, New York (2012)Google Scholar
  16. 16.
    Jones, M.P.: Experience report: playing the DSL card. In: ICFP (2008)Google Scholar
  17. 17.
    Lorenz, D.H., Rosenan, B.: Cedalion: a language for language oriented programming. In: OOPSLA, vol. 46 (October 2011)Google Scholar
  18. 18.
    Markstrum, S., Marino, D., Esquivel, M., Millstein, T.D., Andreae, C., Noble, J.: JavaCOP: Declarative pluggable types for Java. ACM Trans. Program. Lang. Syst. 32(2) (2010)Google Scholar
  19. 19.
    Meyer, B.: Eiffel: The Language. Prentice Hall (1992)Google Scholar
  20. 20.
    Odersky, M.: Contracts for scala. In: Barringer, H., Falcone, Y., Finkbeiner, B., Havelund, K., Lee, I., Pace, G., Roşu, G., Sokolsky, O., Tillmann, N. (eds.) RV 2010. LNCS, vol. 6418, pp. 51–57. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  21. 21.
    Odersky, M.: The Scala language specification. Tech. rep., Programming Methods Laboratory, EPFL (2011)Google Scholar
  22. 22.
    Papi, M.M., Ali, M., Correa, J. T.L., Perkins, J.H., Ernst, M.D.: Practical pluggable types for Java. In: ISSTA (2008)Google Scholar
  23. 23.
    Rompf, T., Odersky, M.: Lightweight modular staging: a pragmatic approach to runtime code generation and compiled DSLs. In: GPCE, New York, NY, USA, pp. 127–136 (2010)Google Scholar
  24. 24.
    Ross, D.T.: Uniform referents: An essential property for a software engineering language. In: Tou, J.T. (ed.) Software Engineering, vol. 1, pp. 91–101. Academic Press (1970)Google Scholar
  25. 25.
    Tobin-Hochstadt, S., St-Amour, V., Culpepper, R., Flatt, M., Felleisen, M.: Languages as libraries. In: PLDI (2011)Google Scholar
  26. 26.
    Voelter, M.: Embedded software development with projectional language workbenches. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds.) MODELS 2010, Part II. LNCS, vol. 6395, pp. 32–46. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  27. 27.
    Wirth, N.: The programming language PASCAL. Acta Informatica 1(1) (1971)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Michael Homer
    • 1
  • Timothy Jones
    • 1
  • James Noble
    • 1
  • Kim B. Bruce
    • 2
  • Andrew P. Black
    • 3
  1. 1.Victoria University of WellingtonWellingtonNew Zealand
  2. 2.Pomona CollegeClaremontUSA
  3. 3.Portland State UniversityPortlandUSA

Personalised recommendations