Corey Brady , Brian Broll , Gordon Stein , Devin Jean , Shuchi Grover , Veronica Cateté , Tiffany Barnes , Ákos Lédeczi
{"title":"Block-based abstractions and expansive services to make advanced computing concepts accessible to novices","authors":"Corey Brady , Brian Broll , Gordon Stein , Devin Jean , Shuchi Grover , Veronica Cateté , Tiffany Barnes , Ákos Lédeczi","doi":"10.1016/j.cola.2022.101156","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101156","url":null,"abstract":"<div><p>Many block-based programming environments have proven to be effective at engaging novices in learning programming. However, most offer only restricted access to the outside world, limiting learners to commands and computing resources built in to the environment. Some allow learners to drag and drop files, connect to sensors and robots locally or issue HTTP requests. But in a world where most of the applications in our daily lives are <em>distributed</em><span> (i.e., their functionality depends on communicating with other computers or accessing resources and data on the internet), the limited support for beginners to envision and create such distributed programs is a lost opportunity. We argue that it is feasible to create environments with simple yet powerful abstractions that open up distributed computing<span> and other widely-used but advanced computing concepts including networking, the Internet of Things, and cybersecurity to novices. The paper presents the architecture of and design decisions behind NetsBlox, a programming environment that supports these ideas. We show how NetsBlox expands opportunities for learning considerably: NetsBlox projects can access a wealth of online data and web services, and they can communicate with other projects. Moreover, the tool infrastructure enables young learners to collaborate with each other during program construction, whether they share their physical location or study remotely. Importantly, providing access to the wider world will also help counter widespread student perceptions that block-based environments are mere toys, and show that they are capable of creating compelling applications. In this way, NetsBlox offers an illuminating example of how tools can be designed to democratize access to powerful ideas in computing.</span></span></p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"73 ","pages":"Article 101156"},"PeriodicalIF":2.2,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72221277","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Context-sensitive parsing for programming languages","authors":"Boštjan Slivnik","doi":"10.1016/j.cola.2022.101172","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101172","url":null,"abstract":"<div><p>Parsing programming languages using context-sensitive rather than context-free grammars is being considered here because a stronger formalism might be beneficial for dealing with increasingly complex programming languages and their syntax, or is more appropriate in some applications. A new deterministic non-backtracking algorithm for parsing deterministic context-sensitive languages is described. It is a significant improvement of the algorithm built into <span>WEAVE</span> and <span>CWEAVE</span> tools for literate programming and requires that the language is described by a context-sensitive reduction system, namely a deterministic formalism similar to a context-sensitive grammar but with strict rules about how reductions are to be applied. The new algorithm uses a reduction automaton for finding the position of the next reduction at each step during parsing rather than a hardcoded trie that is build into the original algorithm of <span>WEAVE</span> and <span>CWEAVE</span>. The new algorithm performs at least twice as few operations per input symbol as the original one. Furthermore, it is shown that parsing a language described by a context-sensitive reduction system need not be limited to typesetting purposes as in literate programming but can be used as a general parsing approach.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"73 ","pages":"Article 101172"},"PeriodicalIF":2.2,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S2590118422000697/pdfft?md5=71c396f28a0247b058401c5f5001037f&pid=1-s2.0-S2590118422000697-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72221279","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Where-provenance for bidirectional editing in spreadsheets","authors":"Jack Williams , Andrew D. Gordon","doi":"10.1016/j.cola.2022.101155","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101155","url":null,"abstract":"<div><p>We explore the idea of adding bidirectionality to spreadsheet formulas, so that editing the output can directly affect the input. We introduce the portal: a value paired with its where-provenance, that is, one or more links to its origin. When a portal is the result of a formula in a cell, that cell inherits the capability to edit locations described by the provenance. The simplicity of portals makes them amenable to implementation in existing systems. We analyse the list of functions provided by a widely used commercial spreadsheet and find that many frequently used functions work with portals with no modification.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"73 ","pages":"Article 101155"},"PeriodicalIF":2.2,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72287707","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Kyungjin Park , Bradford Mott , Seung Lee , Anisha Gupta , Katie Jantaraweragul , Krista Glazewski , J. Adam Scribner , Anne Ottenbreit-Leftwich , Cindy E. Hmelo-Silver , James Lester
{"title":"Investigating a visual interface for elementary students to formulate AI planning tasks","authors":"Kyungjin Park , Bradford Mott , Seung Lee , Anisha Gupta , Katie Jantaraweragul , Krista Glazewski , J. Adam Scribner , Anne Ottenbreit-Leftwich , Cindy E. Hmelo-Silver , James Lester","doi":"10.1016/j.cola.2022.101157","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101157","url":null,"abstract":"<div><p><span><span>Recent years have seen the rapid adoption of artificial intelligence (AI) in every facet of society. The ubiquity of AI has led to an increasing demand to integrate AI </span>learning experiences into K-12 education. Early learning experiences incorporating AI concepts and practices are critical for students to better understand, evaluate, and utilize AI technologies. AI planning is an important class of AI technologies in which an AI-driven agent utilizes the structure of a problem to construct plans of actions to perform a task. Although a growing number of efforts have explored promoting AI education for K-12 learners, limited work has investigated effective and engaging approaches for delivering AI learning experiences to elementary students. In this article, we propose a visual interface to enable upper elementary students (grades 3–5, ages 8–11) to formulate AI planning tasks within a game-based learning environment. We present our approach to designing the visual interface as well as how the AI planning tasks are embedded within narrative-centered gameplay structured around a Use-Modify-Create scaffolding progression. Further, we present results from a study of upper elementary students using the visual interface. We discuss how the Use-Modify-Create approach supported student learning as well as discuss the misconceptions and </span>usability issues students encountered while using the visual interface to formulate AI planning tasks.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"73 ","pages":"Article 101157"},"PeriodicalIF":2.2,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72287706","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Anderson Faustino da Silva , Edson Borin , Fernando Magno Quintão Pereira , Nilton Luiz Queiroz Junior , Otávio Oliveira Napoli
{"title":"Program representations for predictive compilation: State of affairs in the early 20’s","authors":"Anderson Faustino da Silva , Edson Borin , Fernando Magno Quintão Pereira , Nilton Luiz Queiroz Junior , Otávio Oliveira Napoli","doi":"10.1016/j.cola.2022.101171","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101171","url":null,"abstract":"<div><p><span>In the last five years, predictive compilation has advanced with long strides. Contributions in the field include new program embeddings, new learning architectures, and datasets with millions of programs. This paper evaluates 25 state-of-the-art program embeddings, three of them new, plus two learning models from previous work. We have trained this apparatus with three large datasets, and have applied it onto three classification problems. When classifying programs according to the problem that they solve, we reproduced the high-accuracy results seen in previous work. However, we have not been able to repeat these results in the two new classification challenges that we study: namely, determining the depth of the most nested loop in a program and determining the best sequence of optimizations to reduce code size of programs. Negative results emerged, even in spite of the large number of classifiers, 25, that we have evaluated. Surprisingly, using the histogram of instruction opcodes, a very simple program embedding, led to about the same classification accuracy than embeddings like </span><span>Ir2Vec</span> or <span>Inst2Vec</span>, which were designed to solve stochastic compilation tasks.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"73 ","pages":"Article 101171"},"PeriodicalIF":2.2,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72221281","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Design, implementation and evaluation of the Hedy programming language","authors":"Marleen Gilsing , Jesús Pelay , Felienne Hermans","doi":"10.1016/j.cola.2022.101158","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101158","url":null,"abstract":"<div><p>Hedy is a programming language that implements the gradual programming approach in which the goal is to lower the syntax barrier by starting with a very simple language, and gradually adding both concepts and refining syntax. This paper describes the design and implementation of Hedy, as well as a first user study involving 39 children between the ages of 11 and age 14 who followed online lessons for six weeks. Based on lesson observations and a written survey filled out by the participants, we aim to understand the impact of using a gradual language. Our findings show that children appreciate the gradual nature of Hedy, find Hedy easy to learn and especially appreciate the power to control the difficulty of Hedy themselves. They also like and frequently use built-in educational features like example code snippets. Challenges of a gradual approach are the fact that commands sometimes change or overlap, and remembering commands and specific syntax remain a challenge. According to the participants, improvements could be made by making Hedy less sensitive to syntax errors, by improving error messages and by localizing keywords to the native language of children.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"73 ","pages":"Article 101158"},"PeriodicalIF":2.2,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S2590118422000557/pdfft?md5=f30b4723b9212932f2f496d1e98291a4&pid=1-s2.0-S2590118422000557-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72221278","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Eduardo Reis , Catarina Gralha , Miguel P. Monteiro
{"title":"Surveying communities of users of MATLAB and clone languages","authors":"Eduardo Reis , Catarina Gralha , Miguel P. Monteiro","doi":"10.1016/j.cola.2022.101170","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101170","url":null,"abstract":"<div><h3>Context:</h3><p><em>MATLAB</em> is a programming language vastly used in scientific and engineering domains by engineers, scientists, and researchers. Still, <em>MATLAB</em> seems to be perceived as being used mainly by non-professional programmers, not taking full advantage of <em>MATLAB</em>’s features (e.g., OOP-support). The current state of the art does not seem to verify these assumptions.</p></div><div><h3>Objectives:</h3><p>Our goal was to fill the gap in the characteristics of the MATLAB community and its users, how proficient they are with the MATLAB, and what is their satisfaction level.</p></div><div><h3>Methods:</h3><p>We performed a survey with 212 valid responses, aiming to characterize the community of <em>MATLAB</em> users and clone languages. The survey was published on several platforms, including Reddit, Linkedin, and MATLAB Central.</p></div><div><h3>Results:</h3><p>There is a balanced distribution across different levels of experience in the community. (12.74%) of our sample uses MATLAB only through the command window. The more users expect other people to use their programs, the more effort they will put into making the code easy to understand, maintain and reuse. The use of OOP is not widespread (22%). The majority of MATLAB users are satisfied with its modularity support.</p></div><div><h3>Conclusions:</h3><p>Our study provides insights into MATLAB’s use patterns that are potentially useful for entities responsible for MATLAB’s future evolution.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"73 ","pages":"Article 101170"},"PeriodicalIF":2.2,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S2590118422000673/pdfft?md5=2ec83f73b2a00c41dd9ac8c37c148c2c&pid=1-s2.0-S2590118422000673-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72221284","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Júnior Löff , Renato B. Hoffmann , Dalvan Griebler , Luiz G. Fernandes
{"title":"Combining stream with data parallelism abstractions for multi-cores","authors":"Júnior Löff , Renato B. Hoffmann , Dalvan Griebler , Luiz G. Fernandes","doi":"10.1016/j.cola.2022.101160","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101160","url":null,"abstract":"<div><p>Stream processing applications have seen an increasing demand with the raised availability of sensors, IoT<span> devices, and user data. Modern systems can generate millions of data items per day that require to be processed timely. To deal with this demand, application programmers<span> must consider parallelism<span> to exploit the maximum performance of the underlying hardware resources. In this work, we introduce improvements to stream processing applications by exploiting fine-grained data parallelism (via Map and MapReduce) inside coarse-grained stream parallelism stages. The improvements are including techniques for identifying data parallelism in sequential codes, a new language, semantic analysis, and a set of definition and transformation rules to perform source-to-source parallel code generation. Moreover, we investigate the feasibility of employing higher-level programming abstractions to support the proposed optimizations. For that, we elect SPar programming model as a use case, and extend it by adding two new attributes to its language and implementing our optimizations as a new algorithm in the SPar compiler. We conduct a set of experiments in representative stream processing and data-parallel applications. The results showed that our new compiler algorithm is efficient and that performance improved by up to 108.4x in data-parallel applications. Furthermore, experiments evaluating stream processing applications towards the composition of stream and data parallelism revealed new insights. The results showed that such composition may improve latencies by up to an order of magnitude. Also, it enables programmers to exploit different degrees of stream and data parallelism to accomplish a balance between throughput and latency according to their necessity.</span></span></span></p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"73 ","pages":"Article 101160"},"PeriodicalIF":2.2,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72221280","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
A. F. da Silva, E. Borin, Fernando Magno Quintão Pereira, Nilton Luiz Queiroz, O. Napoli
{"title":"Program representations for predictive compilation: State of affairs in the early 20's","authors":"A. F. da Silva, E. Borin, Fernando Magno Quintão Pereira, Nilton Luiz Queiroz, O. Napoli","doi":"10.1016/j.cola.2022.101171","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101171","url":null,"abstract":"","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"43 1","pages":"101171"},"PeriodicalIF":2.2,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"77651916","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"A surprisingly simple Lua compiler—Extended version","authors":"Hugo Musso Gualandi, Roberto Ierusalimschy","doi":"10.1016/j.cola.2022.101151","DOIUrl":"https://doi.org/10.1016/j.cola.2022.101151","url":null,"abstract":"<div><p>Dynamically-typed programming languages are often implemented using interpreters, which offer several advantages in terms of portability and flexibility of the implementation. However, as a language matures and its programs get bigger, programmers may seek compilers, to avoid the interpretation overhead.</p><p>In this study, we present LuaAOT, a simple ahead-of-time compiler for Lua derived from the reference Lua interpreter. We describe two alternative compilation strategies. The first one exemplifies an old idea of using partial evaluation to produce a compiler based on an existing interpreter. Its contribution is to apply this idea to a well-established programming language. We show that with a quite modest effort it is possible to implement an efficient compiler that covers the entirety of Lua, including coroutines and tail calls. The whole implementation required less than 500 lines of new code. For this effort, we reduced the running time of our benchmarks from 20% to 60%.</p><p>The second compilation strategy is based on function “outlining”, where each bytecode is implemented by a small subroutine. This strategy reduces executable sizes and compilation times, at the cost of not speeding up the running times as much as the first compilation method.</p></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"72 ","pages":"Article 101151"},"PeriodicalIF":2.2,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"72242279","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}