skip to main content
article
Open Access

The semantics of name resolution in grace

Published:24 October 2017Publication History
Skip Abstract Section

Abstract

Grace is a dynamic object oriented programming language designed to aid programming education. We present a formal model of and give an operational semantics for its object model and name resolution algorithm. Our main contributions are a systematic model of Grace’s name resolution using scope graphs, relating linguistic features to other languages, and an operationalization of this model in the form of an operational semantics which is readable and executable. The semantics are extensively tested against a reference Grace implementation.

References

  1. Hubert Baumeister, Harald Ganzinger, Georg Heeg, and Michael Rüger. 1987. Smalltalk-80. it 29, 4 (1987), 241–251.Google ScholarGoogle Scholar
  2. Lorenzo Bettini. 2016. Implementing Domain-Specific Languages with Xtext and Xtend (2nd ed.). Packt Publishing.Google ScholarGoogle Scholar
  3. Lorenzo Bettini. 2016. Implementing type systems for the IDE with Xsemantics. jlp 85, 5 (2016), 655–680.Google ScholarGoogle Scholar
  4. Andrew P. Black, Kim B. Bruce, Michael Homer, and James Noble. 2012. Grace: the absence of (inessential) difficulty. In OOPSLA. 85–98.Google ScholarGoogle Scholar
  5. Denis Bogdanas and Grigore Rosu. 2015. K-Java: A Complete Semantics of Java. In POPL. 445–456.Google ScholarGoogle Scholar
  6. Gilad Bracha. 2007. On the interaction of method lookup and scope with inheritance and nesting. In In 3rd ECOOP Workshop on Dynamic Languages and Applications (DYLA).Google ScholarGoogle Scholar
  7. Gilad Bracha. 2017. Newspeak programming language draft specification version 0.1. http://newspeaklanguage.org/spec/newspeakspec.pdf. (February 2017).Google ScholarGoogle Scholar
  8. Martin Bravenboer, Arthur van Dam, Karina Olmos, and Eelco Visser. 2006. Program Transformation with Scoped Dynamic Rewrite Rules. FUIN 69, 1-2 (2006), 123–178.Google ScholarGoogle Scholar
  9. Martin Churchill, Peter D. Mosses, Neil Sculthorpe, and Paolo Torrini. 2015. Reusable Components of Semantic Specifications. TAOSD 12 (2015), 132–179. Google ScholarGoogle ScholarCross RefCross Ref
  10. ECMA. 2009. ECMA-262 ECMAScript Language Specification. http://www.ecma-international.org/publications/files/ECMA-ST/ ECMA-262.pdf . (December 2009).Google ScholarGoogle Scholar
  11. Chucky Ellison and Grigore Rosu. 2012. An executable formal semantics of C with applications. In POPL. 533–544. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Sebastian Erdweg, Tijs van der Storm, Markus Völter, Laurence Tratt, Remi Bosman, William R. Cook, Albert Gerritsen, Angelo Hulshout, Steven Kelly 0001, Alex Loh, Gabriël D. P. Konat, Pedro J. Molina, Martin Palatnik, Risto Pohjonen, Eugen Schindler, Klemens Schindler, Riccardo Solmi, Vlad A. Vergu, Eelco Visser, Kevin van der Vlist, Guido Wachsmuth, and Jimi van der Woning. 2015. Evaluating and comparing language workbenches: Existing results and benchmarks for the future. Comp. Lang., Syst. & Struct. 44 (2015), 24–47.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Matthias Felleisen, Robby Findler, and Matthew Flatt. 2009. Semantics Engineering with PLT Redex. MIT Press.Google ScholarGoogle Scholar
  14. Adele Goldberg and David Robson. 1983. Smalltalk-80: The Language and Its Implementation. Addison-Wesley.Google ScholarGoogle Scholar
  15. James Gosling, Bill Joy, Guy Steele, Gilad Bracha, and Alex Buckley. 2014. The Java Language Specification. Java SE 8 Edition.Google ScholarGoogle Scholar
  16. Arjun Guha, Claudiu Saftoiu, and Shriram Krishnamurthi. 2010. The Essence of JavaScript. In ECOOP. 126–150. Google ScholarGoogle ScholarCross RefCross Ref
  17. Michael Homer, James Noble, Kim B. Bruce, and Andrew P. Black. 2013. Modules and dialects as objects in Grace. School of Engineering and Computer Science, Victoria University of Wellington (2013).Google ScholarGoogle Scholar
  18. Michael Homer, James Noble, Kim B. Bruce, Andrew P. Black, and David J. Pearce. 2012. Patterns as objects in grace. In DLS. 17–28. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Gilles Kahn. 1987. Natural Semantics. In STACS. 22–39. Google ScholarGoogle ScholarCross RefCross Ref
  20. Lennart C. L. Kats and Eelco Visser. 2010. The Spoofax language workbench: rules for declarative specification of languages and IDEs. In OOPSLA. 444–463. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Paul Klint, Tijs van der Storm, and Jurgen J. Vinju. 2009. RASCAL: A Domain Specific Language for Source Code Analysis and Manipulation. In SCAM. 168–177. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Gabriël D. P. Konat, Lennart C. L. Kats, Guido Wachsmuth, and Eelco Visser. 2012. Declarative Name Binding and Scope Rules. In SLE. 311– 331.Google ScholarGoogle Scholar
  23. Sergio Maffeis, John C. Mitchell, and Ankur Taly. 2008. An Operational Semantics for JavaScript. In aplas. 307–325.Google ScholarGoogle Scholar
  24. Peter D. Mosses and Mark J. New. 2009. Implicit Propagation in Structural Operational Semantics. ENTCS 229, 4 (2009), 49–66. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Jukka Mäki-Turja, K Post, and Jan Gustafsson. 1997. An operational semantics for Smalltalk. Department of Computer Engineering, Mälardalen University, Sweden (1997).Google ScholarGoogle Scholar
  26. Pierre Néron, Andrew P. Tolmach, Eelco Visser, and Guido Wachsmuth. 2015. A Theory of Name Resolution. In ESOP. 205–231. Google ScholarGoogle ScholarCross RefCross Ref
  27. Gordon D. Plotkin. 2004. A structural approach to operational semantics. jlp 60-61 (2004), 17–139.Google ScholarGoogle Scholar
  28. Joe Gibbs Politz, Alejandro Martinez, Matthew Milano, Sumner Warren, Daniel Patterson, Junsong Li, Anand Chitipothu, and Shriram Krishnamurthi. 2013. Python: the full monty. In OOPSLA. 217–232. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Casper Bach Poulsen, Pierre Néron, Andrew P. Tolmach, and Eelco Visser. 2016. Scopes Describe Frames: A Uniform Model for Memory Layout in Dynamic Semantics. In ECOOP.Google ScholarGoogle Scholar
  30. Grigore Rosu and Traian-Florin Serbanuta. 2010. An overview of the K semantic framework. jlp 79, 6 (2010), 397–434.Google ScholarGoogle Scholar
  31. David Ungar and Randall B. Smith. 1987. Self: The Power of Simplicity. In OOPSLA. 227–242.Google ScholarGoogle Scholar
  32. Hendrik van Antwerpen, Pierre Néron, Andrew P. Tolmach, Eelco Visser, and Guido Wachsmuth. 2016. A constraint language for static semantic analysis based on scope graphs. In PEPM. 49–60. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Vlad Vergu, Michiel Haisma, and Eelco Visser. 2017. The Semantics of Name Resolution in Grace. Technical Report TUD-SERG-2017-011. Software Engineering Research Group, Delft University of Technology.Google ScholarGoogle Scholar
  34. Vlad A. Vergu, Pierre Néron, and Eelco Visser. 2015. DynSem: A DSL for Dynamic Semantics Specification. In RTA. 365–378.Google ScholarGoogle Scholar
  35. Eelco Visser, Guido Wachsmuth, Andrew P. Tolmach, Pierre Néron, Vlad A. Vergu, Augusto Passalaqua, and Gabriël D. P. Konat. 2014. A Language Designer’s Workbench: A One-Stop-Shop for Implementation and Verification of Language Designs. In OOPSLA. 95–111. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Tobi Vollebregt, Lennart C. L. Kats, and Eelco Visser. 2012. Declarative specification of template-based textual editors. In LDTA. 1–7.Google ScholarGoogle Scholar
  37. Mario Wolczko. 1987. Semantics of Smalltalk-80. In ECOOPW. 108– 120. Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. The semantics of name resolution in grace

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 52, Issue 11
        DLS '17
        November 2017
        86 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3170472
        Issue’s Table of Contents
        • cover image ACM Conferences
          DLS 2017: Proceedings of the 13th ACM SIGPLAN International Symposium on on Dynamic Languages
          October 2017
          86 pages
          ISBN:9781450355261
          DOI:10.1145/3133841

        Copyright © 2017 Owner/Author

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 24 October 2017

        Check for updates

        Qualifiers

        • article
      • Article Metrics

        • Downloads (Last 12 months)82
        • Downloads (Last 6 weeks)5

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!