ABSTRACT
Block-based environments are visual programming environments that allow users to program by interactively arranging visual jigsaw-like blocks. They have shown to be helpful in several domains but often require experienced developers for their creation. Previous research investigated the use of language workbenches to generate block-based editors based on grammars, but the generated block-based editors sometimes provided too many unnecessary blocks, leading to verbose environments and programs. To reduce the number of interactions, we propose a set of transformations to simplify the original grammar, yielding a reduction of the number of (useful) kinds of blocks available in the resulting editors. We show that our generated block-based editors are improved for a set of observed aesthetic criteria up to a certain complexity. As such, analyzing and simplifying grammars before generating block-based editors allows us to derive more compact and potentially more usable block-based editors, making reuse of existing grammars through automatic generation feasible.
Supplemental Material
- Andrew W. Appel and Jens Palsberg. 2003. Modern Compiler Implementation in Java (2nd ed.). Cambridge University Press. isbn:052182060XGoogle Scholar
- Jack Atherton and Paulo Blikstein. 2017. Sonification Blocks: A Block-Based Programming Environment For Embodied Data Sonification. In Proceedings of the 2017 Conference on Interaction Design and Children (IDC ’17). Association for Computing Machinery, New York, NY, USA. 733–736. isbn:9781450349215 https://doi.org/10.1145/3078072.3091992 Google ScholarDigital Library
- David Bau, Jeff Gray, Caitlin Kelleher, Josh Sheldon, and Franklyn Turbak. 2017. Learnable Programming: Blocks and Beyond. Commun. ACM, 60, 6 (2017), May, 72–80. issn:0001-0782 https://doi.org/10.1145/3015455 Google ScholarDigital Library
- A. F. Blackwell, C. Britton, A. Cox, T. R. G. Green, C. Gurr, G. Kadoda, M. S. Kutar, M. Loomes, C. L. Nehaniv, M. Petre, C. Roast, C. Roe, A. Wong, and R. M. Young. 2001. Cognitive Dimensions of Notations: Design Tools for Cognitive Technology. In Cognitive Technology: Instruments of Mind, Meurig Beynon, Chrystopher L. Nehaniv, and Kerstin Dautenhahn (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 325–341. isbn:978-3-540-44617-0Google Scholar
- Rodrigo Bonifacio. 2008. Rascal-Java8. https://github.com/PAMunb/rascal-Java8/blob/master/src/lang/java/syntax/Java18.rsc [Online, accessed 15 July 2021].Google Scholar
- TIOBE Software BV. 2021. TIOBE Index for July 2021. https://www.tiobe.com/tiobe-index/ [Online, accessed 15 July 2021].Google Scholar
- João Cangussu, Jens Palsberg, and Vidyut Samanta. 2002. The MiniJava Project. https://www.cambridge.org/us/features/052182060X [Online, accessed 12 October 2020].Google Scholar
- CWI-SWAT. 2019. SweeterJS. https://github.com/cwi-swat/hack- your-javascript [Online, accessed 12 July 2021].Google Scholar
- Merijn de Jonge, Eelco Visser, and Joost Visser. 2001. XT: a bundle of program transformation tools. Electron. Notes Theor. Comput. Sci., 44, 2 (2001), 79–86. https://doi.org/10.1016/S1571-0661(04)80921-6 Google ScholarCross Ref
- Sebastian Erdweg, Tijs van der Storm, Markus Völter, Laurence Tratt, Remi Bosman, William R. Cook, Albert Gerritsen, Angelo Hulshout, Steven Kelly, Alex Loh, Gabriël Konat, Pedro J. Molina, Martin Palatnik, Risto Pohjonen, Eugen Schindler, Klemens Schindler, Riccardo Solmi, Vlad 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. Computer Languages, Systems & Structures, 44 (2015), 24–47. issn:1477-8424 https://doi.org/10.1016/j.cl.2015.08.007 Special issue on the 6th and 7th International Conference on Software Language Engineering (SLE 2013 and SLE 2014). Google ScholarDigital Library
- Bryan Ford. 2004. Parsing Expression Grammars: A Recognition-Based Syntactic Foundation. SIGPLAN Not., 39, 1 (2004), Jan., 111–122. issn:0362-1340 https://doi.org/10.1145/982962.964011 Google ScholarDigital Library
- Bryan Ford. 2004. Parsing Expression Grammars: A Recognition-Based Syntactic Foundation. In Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’04). Association for Computing Machinery, New York, NY, USA. 111–122. isbn:158113729X https://doi.org/10.1145/964001.964011 Google ScholarDigital Library
- Google. 2020. Blockly. https://developers.google.com/blockly [Online, accessed 13 July 2021].Google Scholar
- Jan Heering, P. R. H. Hendriks, Paul Klint, and J. Rekers. 1989. The syntax definition formalism SDF - reference manual. ACM SIGPLAN Notices, 24, 11 (1989), 43–75. https://doi.org/10.1145/71605.71607 Google ScholarDigital Library
- Robert Holwerda and Felienne Hermans. 2018. A Usability Analysis of Blocks-based Programming Editors using Cognitive Dimensions. In 2018 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC). 217–225. https://doi.org/10.1109/VLHCC.2018.8506483 Google ScholarCross Ref
- Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace, and Alan Kay. 1997. Back to the Future: The Story of Squeak, a Practical Smalltalk Written in Itself. In Proceedings of the 12th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA ’97). Association for Computing Machinery, New York, NY, USA. 318–326. isbn:0897919084 https://doi.org/10.1145/263698.263754 Google ScholarDigital Library
- Stephen C. Johnson. 1979. Yacc: Yet Another Compiler-Compiler.Google Scholar
- Paul Klint, Tijs van der Storm, and Jurgen Vinju. 2009. RASCAL: A Domain Specific Language for Source Code Analysis and Manipulation. In Proceedings of the 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM ’09). IEEE Computer Society, Washington, DC, USA. 168–177. isbn:978-0-7695-3793-1 https://doi.org/10.1109/SCAM.2009.28 Google ScholarDigital Library
- Ralf Lämmel and Vadim Zaytsev. 2009. An Introduction to Grammar Convergence. In Integrated Formal Methods, 7th International Conference, IFM 2009, Düsseldorf, Germany, February 16-19, 2009. Proceedings, Michael Leuschel and Heike Wehrheim (Eds.) (Lecture Notes in Computer Science, Vol. 5423). Springer, 246–260. https://doi.org/10.1007/978-3-642-00255-7_17 Google ScholarDigital Library
- Mauricio Verano Merino. 2020. maveme/bacata-demos: First release. https://doi.org/10.5281/zenodo.3636103 Google ScholarCross Ref
- Mauricio Verano Merino. 2020. Rascal - Sonification Blocks. https://github.com/cwi-swat/kogi-examples/blob/master/src/kogi/sonification/Syntax.rsc [Online, accessed 12 July 2021].Google Scholar
- Mauricio Verano Merino, Jur Bartels, Mark van den Brand, Tijs van der Storm, and Eugen Schindler. 2021. Projecting Textual Languages. Springer International Publishing, Cham. 197–225. isbn:978-3-030-73758-0 https://doi.org/10.1007/978-3-030-73758-0_7Google Scholar
- Mauricio Verano Merino and Tijs van der Storm. 2020. cwi-swat/kogi: Kogi 0.1.0. https://doi.org/10.5281/zenodo.4033220 Google ScholarDigital Library
- Mauricio Verano Merino, Jurgen Vinju, and Mark van den Brand. 2021. DRAFT-What you always wanted to know but could not find about block-based environments. arxiv:2110.03073. arxiv:2110.03073 [Under review at ACM Computing Surveys].Google Scholar
- Luke Moors and Robert Sheehan. 2017. Aiding the Transition from Novice to Traditional Programming Environments. In Proceedings of the 2017 Conference on Interaction Design and Children (IDC ’17). Association for Computing Machinery, New York, NY, USA. 509–514. isbn:9781450349215 https://doi.org/10.1145/3078072.3084317 Google ScholarDigital Library
- JetBrains MPS. 2021. Editor Actions. https://www.jetbrains.com/help/mps/editor-actions.html [Online, accessed 26 September 2021].Google Scholar
- Jakob Nielsen and Rolf Molich. 1990. Heuristic Evaluation of User Interfaces. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI ’90). Association for Computing Machinery, New York, NY, USA. 249–256. isbn:0201509326 https://doi.org/10.1145/97243.97281 Google ScholarDigital Library
- Thomas W. Price and Tiffany Barnes. 2015. Comparing Textual and Block Interfaces in a Novice Programming Environment. In Proceedings of the Eleventh Annual International Conference on International Computing Education Research (ICER ’15). Association for Computing Machinery, New York, NY, USA. 91–99. isbn:9781450336307 https://doi.org/10.1145/2787622.2787712 Google ScholarDigital Library
- Thomas W. Reps and Tim" Teitelbaum. 1989. Defining Hybrid Editors with the Synthesizer Generator. Springer New York, New York, NY. 95–142. isbn:978-1-4613-9623-9 https://doi.org/10.1007/978-1-4613-9623-9_6 Google ScholarCross Ref
- SonarSource SA. 2008. SonarQube. https://www.sonarqube.org [Online, accessed 15 July 2021].Google Scholar
- Amazon Web Services. 2021. AWS CloudFormation Documentation. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html [Online, accessed 12 July 2021].Google Scholar
- L. Thomas van Binsbergen and Verano Merino. 2020. Rascal-MiniJava. https://github.com/cwi-swat/rascal-minijava [Online, accessed 12 July 2021].Google Scholar
- Mauricio Verano Merino and Tijs van der Storm. 2020. Block-Based Syntax from Context-Free Grammars. In Proceedings of the 13th ACM SIGPLAN International Conference on Software Language Engineering (SLE 2020). Association for Computing Machinery, New York, NY, USA. 283–295. isbn:9781450381765 https://doi.org/10.1145/3426425.3426948 Google ScholarDigital Library
- David Weintrop, Afsoon Afzal, Jean Salac, Patrick Francis, Boyang Li, David C. Shepherd, and Diana Franklin. 2018. Evaluating CoBlox: A Comparative Study of Robotics Programming Environments for Adult Novices. Proceedings of the 2018 CHI Conference on Human Factors in Computing Systems - CHI ’18, 1–12. isbn:9781450356206 https://doi.org/10.1145/3173574.3173940 Google ScholarDigital Library
- David Weintrop and Uri Wilensky. 2017. Between a Block and a Typeface: Designing and Evaluating Hybrid Programming Environments. In Proceedings of the 2017 Conference on Interaction Design and Children (IDC ’17). Association for Computing Machinery, New York, NY, USA. 183–192. isbn:9781450349215 https://doi.org/10.1145/3078072.3079715 Google ScholarDigital Library
- David S. Wile. 1997. Abstract Syntax from Concrete Syntax. In Pulling Together, Proceedings of the 19th International Conference on Software Engineering, Boston, Massachusetts, USA, May 17-23, 1997, W. Richards Adrion, Alfonso Fuggetta, Richard N. Taylor, and Anthony I. Wasserman (Eds.). ACM, 472–480. https://doi.org/10.1145/253228.253388 Google ScholarDigital Library
- Vadim Zaytsev. 2010. Recovery, Convergence and Documentation of Languages. Oct., PhD thesis, Vrije Universiteit.Google Scholar
Index Terms
- Getting grammars into shape for block-based editors
Recommendations
Workbench for Creating Block-Based Environments
SLE 2022: Proceedings of the 15th ACM SIGPLAN International Conference on Software Language EngineeringBlock-based environments are visual-programming environments that allow users to create programs by dragging and dropping blocks that resemble jigsaw puzzle pieces. These environments have proven to lower the entry barrier of programming for end-...
Block-based syntax from context-free grammars
SLE 2020: Proceedings of the 13th ACM SIGPLAN International Conference on Software Language EngineeringBlock-based programming systems employ a jigsaw metaphor to write programs. They are popular in the domain of programming education (e.g., Scratch), but also used as a programming interface for end-users in other disciplines, such as arts, robotics, and ...
A practical method for the implementation of syntactic parsers
ICAI'05/MCBC'05/AMTA'05/MCBE'05: Proceedings of the 6th WSEAS international conference on Automation & information, and 6th WSEAS international conference on mathematics and computers in biology and chemistry, and 6th WSEAS international conference on acoustics and music: theory and applications, and 6th WSEAS international conference on Mathematics and computers in business and economicsThe implementation of syntactic parsers is a very important task in compiler construction. There are several classic methods and algorithms used for syntactic parser construction [1][2][3][4][5]. In [3] there is a proposal of a method for the automatic ...
Comments