Graceful Language Extensions and Interfaces

Grace is a programming language under development aimed at education. Grace is object-oriented, imperative, and block-structured, and intended for use in firstand second-year object-oriented programming courses. We present a number of language features we have designed for Grace and implemented in our self-hosted compiler. We describe the design of a pattern-matching system with object-oriented structure and minimal extension to the language. We give a design for an object-based module system, which we use to build dialects, a means of extending and restricting the language available to the programmer, and of implementing domain-specific languages. We show a visual programming interface that melds visual editing (a la Scratch) with textual editing, and that uses our dialect system, and we give the results of a user experiment we performed to evaluate the usability of our interface.

[1]  Eric Rosenbaum,et al.  Scratch: programming for all , 2009, Commun. ACM.

[2]  Matthias Felleisen,et al.  DrScheme: a programming environment for Scheme , 2002, J. Funct. Program..

[3]  Colleen M. Lewis How programming environment shapes perception, learning and goals: logo vs. scratch , 2010, SIGCSE.

[4]  Sam Tobin-Hochstadt,et al.  Advanced Macrology and the Implementation of Typed Scheme , 2007 .

[5]  Patricia Haden,et al.  Programming osmosis: Knowledge transfer from imperative to visual programming environments , 2007 .

[6]  Victor Luchangco,et al.  The Fortress Language Specification Version 1.0 , 2007 .

[7]  David Notkin,et al.  Gandalf: Software development environments , 1986, IEEE Transactions on Software Engineering.

[8]  Caitlin Kelleher,et al.  Storytelling alice motivates middle school girls to learn computer programming , 2007, CHI.

[9]  Mark Tullsen,et al.  First Class Patterns , 2000, PADL.

[10]  David W. Valentine CS educational research: a meta-analysis of SIGCSE technical symposium proceedings , 2004 .

[11]  Jonathan Robie,et al.  Editors , 2003 .

[12]  Andrew P. Black,et al.  Modules as gradually-typed objects , 2013 .

[13]  J. Piaget Six Psychological Studies , 1967 .

[14]  James Noble,et al.  Explicit Relationships in Object Oriented Development , 1995 .

[15]  Barry Jay Pattern Calculus - Computing with Functions and Structures , 2009 .

[16]  Brian Wilkerson,et al.  A overview of modular smalltalk , 1988, OOPSLA '88.

[17]  Damian Conway,et al.  GRAIL: A Zeroth Programming Language , 1999 .

[18]  Elliot Soloway,et al.  Mental models and software maintenance , 1986, J. Syst. Softw..

[19]  Mordechai Ben-Ari,et al.  Habits of programming in scratch , 2011, ITiCSE '11.

[20]  Lindsay Groves,et al.  Whiley: A Platform for Research in Software Verification , 2013, SLE.

[21]  Martin Fowler,et al.  Domain-Specific Languages , 2010, The Addison-Wesley signature series.

[22]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[23]  Guy L. Steele,et al.  Adding Pattern Matching to Existing Object-Oriented Languages , 2010 .

[24]  David B. Wortman,et al.  A sequence of structured subsets of PL/I , 1974, SIGCSE '74.

[25]  James Noble,et al.  Spreadsheet Visualisation to Improve End-user Understanding , 2003, InVis.au.

[26]  Craig Schaffert,et al.  Abstraction mechanisms in CLU , 1977, Commun. ACM.

[27]  John F. Wakerly,et al.  The programming language PASCAL , 1979, Microprocessors and microsystems.

[28]  Gavin M. Bierman,et al.  Lost in translation: formalizing proposed extensions to c# , 2007, OOPSLA.

[29]  Diana Franklin,et al.  Assessment of computer science learning in a scratch-based outreach program , 2013, SIGCSE '13.

[30]  Martin Odersky,et al.  Lightweight modular staging: a pragmatic approach to runtime code generation and compiled DSLs , 2010, GPCE '10.

[31]  Marcia C. Linn,et al.  The Demands and Requirements of Computer Programming: A Literature Review , 1985 .

[32]  Mary Shaw,et al.  An introduction to the construction and verification of Alphard programs , 1976, ICSE '76.

[33]  Janet Rountree,et al.  Learning and Teaching Programming: A Review and Discussion , 2003, Comput. Sci. Educ..

[34]  Kori Inkpen Quinn,et al.  Drag-and-drop versus point-and-click mouse interaction styles for children , 2001, TCHI.

[35]  Margaret M. Burnett,et al.  End-user debugging strategies: A sensemaking perspective , 2012, TCHI.

[36]  Sheng Liang,et al.  Java Native Interface: Programmer's Guide and Reference , 1999 .

[37]  Eelco Visser,et al.  The spoofax language workbench: rules for declarative specification of languages and IDEs , 2010, OOPSLA.

[38]  Andrew P. Black,et al.  Seeking grace: a new object-oriented language for novices , 2013, SIGCSE '13.

[39]  Sam Tobin-Hochstadt,et al.  Languages as libraries , 2011, PLDI '11.

[40]  Sam Tobin-Hochstadt,et al.  Extensible Pattern Matching in an Extensible Language , 2011, ArXiv.

[41]  Benjamin Chung,et al.  Wyvern: a simple, typed, and pure object-oriented language , 2013 .

[42]  Vijay Saraswat,et al.  GPU programming in a high level language: compiling X10 to CUDA , 2011, X10 '11.

[43]  Bernard Lang,et al.  Outline of a Tool for Document Manipulation , 1983, IFIP Congress.

[44]  Michael Kölling,et al.  The Greenfoot Programming Environment , 2010, TOCE.

[45]  Ganesh Sittampalam,et al.  Paradise: a two-stage DSL embedded in Haskell , 2008, ICFP 2008.

[46]  Roberto Ierusalimschy,et al.  A text pattern-matching tool based on Parsing Expression Grammars , 2009 .

[47]  Theo D'Hondt,et al.  Ambient-oriented programming in ambientTalk , 2005, OOPSLA '05.

[48]  R. Nigel Horspool,et al.  TouchDevelop: Programming on the Go , 2013, Apress.

[49]  J. Piaget Science of education and the psychology of the child , 1970 .

[50]  Victor R. Delclos Teaching Thinking through LOGO: The Importance of Method. Technical Report Series, Report No. 84.1.2. , 1984 .

[51]  Yasmin B. Kafai,et al.  The writers' workshop for youth programmers: digital storytelling with scratch in middle school classrooms , 2012, SIGCSE '12.

[52]  Randall B. Smith,et al.  Self: The power of simplicity , 1987, OOPSLA 1987.

[53]  Richard E. Mayer,et al.  Teaching for Transfer of Computer Program Comprehension Skill. , 1989 .

[54]  Joost Visser,et al.  Matching Objects Without Language Extension , 2006, J. Object Technol..

[55]  Clemens A. Szyperski,et al.  Import is Not Inheritance - Why We Need Both: Modules and Classes , 1992, ECOOP.

[56]  Daan Leijen,et al.  Parsec: direct style monadic parser combinators for the real world , 2001 .

[57]  Martin Odersky,et al.  Matching Objects with Patterns , 2007, ECOOP.

[58]  David Thomas,et al.  The Pragmatic Programmer: From Journeyman to Master , 1999 .

[59]  Edward J. McCluskey,et al.  Curriculum 68: Recommendations for academic programs in computer science: a report of the ACM curriculum committee on computer science , 1968, CACM.

[60]  Bertrand Meyer,et al.  Eiffel: The Language , 1991 .

[61]  Laurence Tratt,et al.  Domain specific language implementation via compile-time meta-programming , 2008, TOPL.

[62]  Leanne M. Hirshfield,et al.  Through the looking glass: teaching CS0 with Alice , 2007, SIGCSE.

[63]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[64]  Rachel Cardell-Oliver,et al.  Motivating all our students? , 2011, ITiCSE-WGR.

[65]  Simon Marlow,et al.  Haskell 2010 Language Report , 2010 .

[66]  Mordechai Ben-Ari,et al.  Learning computer science concepts with scratch , 2010, ICER '10.

[67]  Yaron Kashai,et al.  Modules as Objects in Newspeak , 2010, ECOOP.

[68]  Chris Lattner,et al.  LLVM: AN INFRASTRUCTURE FOR MULTI-STAGE OPTIMIZATION , 2000 .

[69]  Michael D. Ernst,et al.  Practical pluggable types for java , 2008, ISSTA '08.

[70]  David H. Lorenz,et al.  Cedalion: a language for language oriented programming , 2011, OOPSLA '11.

[71]  Anthony V. Robins,et al.  My Program is Correct But it Doesn t Run: A Preliminary Investigation of Novice Programmers Problems , 2005, ACE.

[72]  Jan Vitek,et al.  Thorn: robust, concurrent, extensible scripting on the JVM , 2009, OOPSLA '09.

[73]  D. Perkins,et al.  Teaching for Transfer. , 1988 .

[74]  Douglas S. Blank,et al.  Calico: a multi-programming-language, multi-context framework designed for computer science education , 2012, SIGCSE '12.

[75]  David B. Palumbo,et al.  Programming Language/Problem-Solving Research: A Review of Relevant Issues , 1990 .

[76]  Christopher G. Lasater,et al.  Design Patterns , 2008, Wiley Encyclopedia of Computer Science and Engineering.

[77]  Anthony V. Robins,et al.  Learning edge momentum: a new account of outcomes in CS1 , 2010, Comput. Sci. Educ..

[78]  Seymour Papert,et al.  Mindstorms: Children, Computers, and Powerful Ideas , 1981 .

[79]  Andrew P. Black,et al.  Graceful Dialects , 2014, ECOOP.

[80]  Heiko Behrens,et al.  Xtext: implement your language faster than the quick and dirty way , 2010, SPLASH/OOPSLA Companion.

[81]  Roberto Ierusalimschy,et al.  The Evolution of an Extension Language: A History of Lua , 2007 .

[82]  Bay-Wei Chang,et al.  Fluid visualization of spreadsheet structures , 1998, Proceedings. 1998 IEEE Symposium on Visual Languages (Cat. No.98TB100254).

[83]  Benjamin Chung,et al.  Type-directed, whitespace-delimited parsing for embedded DSLs , 2013, GlobalDSL@ECOOP.

[84]  Jan Vitek,et al.  Matchete: Paths through the Pattern Matching Jungle , 2008, PADL.

[85]  Raymond Lister COMPUTING EDUCATION RESEARCH , 2010 .

[86]  Ondrej Lhoták,et al.  OOMatch: pattern matching as dispatch in Java , 2007, OOPSLA '07.

[87]  D. Clements,et al.  Effects of Computer Programming on Young Children's Cognition , 1984 .

[88]  Bard Bloom,et al.  Robust scripting via patterns , 2012, DLS '12.

[89]  Umut A. Acar,et al.  Extensible programming with first-class cases , 2006, ICFP '06.

[90]  Gregg Rothermel,et al.  Testing Homogeneous Spreadsheet Grids with the "What You See Is What You Test" Methodology , 2002, IEEE Trans. Software Eng..

[91]  Anthony V. Robins Transfer in Cognition , 1998, Learning to Learn.

[92]  Markus Völter,et al.  Embedded software development with projectional language workbenches , 2010, MODELS'10.

[93]  Andreas Stefik,et al.  An Empirical Investigation into Programming Language Syntax , 2013, TOCE.

[94]  Abigail Sellen,et al.  A comparison of input devices in element pointing and dragging tasks , 1991, CHI.

[95]  Philip Wadler,et al.  Views: a way for pattern matching to cohabit with data abstraction , 1987, POPL '87.

[96]  Luca Cardelli,et al.  Modula-3 language definition , 1992, SIGP.

[97]  Matthew J. Parkinson,et al.  The java module system: core design and semantic definition , 2007, OOPSLA.

[98]  Douglas J. Gillan,et al.  How does Fitts' law fit pointing and dragging? , 1990, CHI '90.

[99]  Shane Markstrum,et al.  JavaCOP: Declarative pluggable types for java , 2010, TOPL.

[100]  J. Piaget Play, dreams and imitation in childhood , 1951 .

[101]  Mark P. Jones Experience report: playing the DSL card , 2008, ICFP 2008.

[102]  Alessandro Warth,et al.  OMeta: an object-oriented language for pattern matching , 2007, DLS '07.

[103]  Bent Bruun Kristensen,et al.  Syntax Directed Program Modularization , 1982 .

[104]  David M. Ungar Annotating objects for transport to other worlds , 1995, OOPSLA.

[105]  Bryan Ford,et al.  Parsing expression grammars: a recognition-based syntactic foundation , 2004, POPL '04.

[106]  Daniel G. Bobrow,et al.  Common lisp object system specification , 1988, SIGP.

[107]  Raymond Lister,et al.  A citation analysis of the sigcse 2007 proceedings , 2008, SIGCSE '08.

[108]  Tarek S. Abdelrahman,et al.  hiCUDA: a high-level directive-based language for GPU programming , 2009, GPGPU-2.

[109]  Jason Holdsworth,et al.  Usability Evaluation of SOLA: An Object-Oriented Programming Environment for Children , 2009 .

[110]  Fabio Mascarenhas,et al.  LuaRocks - A Declarative and Extensible Package Management System for Lua , 2013, SBLP.

[111]  Niklaus Wirth,et al.  Pascal User Manual and Report , 1991, Springer New York.

[112]  Randy F. Pausch,et al.  Teaching objects-first in introductory computer science , 2003, SIGCSE.

[113]  David Perkins,et al.  Fragile knowledge and neglected strategies in novice programmers , 1985 .

[114]  Craig Chambers,et al.  The cecil language: specification and rationale , 1993 .

[115]  Jules J Berman,et al.  Perl: The Programming Language , 2008 .

[116]  Wolmet Barendregt,et al.  Children may expect drag-and-drop instead of point-and-click , 2011, CHI EA '11.

[117]  Murray Hill,et al.  Why Pascal is Not My Favorite Programming Language , 1981 .

[118]  Colleen M. Lewis,et al.  Children's perceptions of what counts as a programming language , 2014 .

[119]  Ned Freed,et al.  Media Type Specifications and Registration Procedures , 2005, RFC.

[120]  Shigeru Chiba,et al.  Composable user-defined operators that can express user-defined literals , 2014, MODULARITY.

[121]  Randy Pausch,et al.  Learning To Program With Alice , 2004 .

[122]  James McKinna,et al.  Why dependent types matter , 2006, POPL '06.

[123]  Ulf Norell,et al.  Dependently typed programming in Agda , 2009, TLDI '09.

[124]  Don Syme,et al.  Extensible pattern matching via a lightweight language extension , 2007, ICFP '07.

[125]  Lynda Thomas,et al.  Dangers of a fixed mindset: implications of self-theories research for computer science education , 2008, SIGCSE 2008.

[126]  David B. MacQueen Modules for standard ML , 1984, LFP '84.

[127]  Kenji Takeda,et al.  Strongly-Typed Language Support for Internet- Scale Information Sources , 2012 .

[128]  Matthias Felleisen,et al.  The DrScheme project: an overview , 1998, SIGP.

[129]  Sukyoung Ryu,et al.  Formal specification of a JavaScript module system , 2012, OOPSLA '12.

[130]  Andrew P. Black,et al.  Grace: the absence of (inessential) difficulty , 2012, Onward! 2012.

[131]  Mitchel Resnick,et al.  Programming by choice: urban youth learning programming with scratch , 2008, SIGCSE '08.

[132]  Thomas D. LaToza,et al.  Active code completion , 2012, ICSE 2012.

[133]  Eelco Visser,et al.  Stratego/XT 0.16: components for transformation systems , 2006, PEPM '06.

[134]  Ickjai Lee,et al.  Assessing the usability of students object-oriented language with first-year IT students: a case study , 2013, OZCHI.

[135]  Benjamin Chung,et al.  Safely Composable Type-Specific Languages , 2014, ECOOP.

[136]  Niklaus Wirth,et al.  Programming in Modula-2 , 1985, Texts and Monographs in Computer Science.

[137]  Rachel Cardell-Oliver,et al.  How can software metrics help novice programmers , 2011, ACE 2011.

[138]  Michael Homer,et al.  A tile-based editor for a textual programming language , 2013, 2013 First IEEE Working Conference on Software Visualization (VISSOFT).

[139]  Lauri Malmi,et al.  A survey of literature on the teaching of introductory programming , 2007, ITiCSE-WGR '07.

[140]  Michael Homer,et al.  Combining Tiled and Textual Views of Code , 2014, 2014 Second IEEE Working Conference on Software Visualization.

[141]  Andrew P. Black,et al.  Patterns as objects in grace , 2012, DLS '12.

[142]  R. J. B. The Child's Conception of the World , 1929, Nature.

[143]  W. Taha,et al.  Plenary talk III Domain-specific languages , 2008, 2008 International Conference on Computer Engineering & Systems.

[144]  James R. Cordy,et al.  TXL: A Rapid Prototyping System for Programming Language Dialects , 1991, Comput. Lang..