On the Applicability of Language Models to Block-Based Programs
Elisabeth Griebl, Benedikt Fein, Florian Obermüller, Gordon Fraser, René Just
摘要
Block-based programming languages like Scratch are increasingly popular for programming education and end-user programming. Recent program analyses build on the insight that source code can be modelled using techniques from natural language processing. Many of the regularities of source code that support this approach are due to the syntactic overhead imposed by textual programming languages. This syntactic overhead, however, is precisely what block-based languages remove in order to simplify programming. Consequently, it is unclear how well this modelling approach performs on block-based programming languages. In this paper, we investigate the applicability of language models for the popular block-based programming language Scratch. We model Scratch programs using n-gram models, the most essential type of language model, and transformers, a popular deep learning model. Evaluation on the example tasks of code completion and bug finding confirm that blocks inhibit predictability, but the use of language models is nevertheless feasible. Our findings serve as foundation for improving tooling and analyses for block-based languages.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- GraphCodeBERT: Pre-training Code Representations with Data Flow 引用了 Code Prediction by Feeding Trees to Transformers
- Code Prediction by Feeding Trees to Transformers 引用了 Big code != big vocabulary: open-vocabulary models for source code
- Multi-task Learning based Pre-trained Language Model for Code Completion 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Multi-task Learning based Pre-trained Language Model for Code Completion 引用了 Code Prediction by Feeding Trees to Transformers
引用它的顶会 Paper1
它引用的 Paper6
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
- GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 1,644 次引用
- Code Prediction by Feeding Trees to TransformersSeohyun Kim, Jinman Zhao, Yuchi Tian, Satish ChandraICSE 2021 · 179 次引用
- Multi-task Learning based Pre-trained Language Model for Code CompletionFang Liu, Ge Li, Yunfei Zhao, Zhi JinASE 2020 · 162 次引用
- Big code != big vocabulary: open-vocabulary models for source codeRafael-Michael Karampatsis, Hlib Babii, Romain Robbes, Charles Sutton 等ICSE 2020 · 140 次引用
相关 Paper
- VisionScratch: LLM-Based Automated Feedback Generation using Code-Produced Videos for Scratch ProgramsYuan Si, Daming Li, Hanyuan Shi, Jialu ZhangFSE 2026 · 1 次引用
- ScratchNet: A Multi-modal Benchmark for Evaluating and Advancing LLMs on Scratch Programming TasksYuan Si, Simeng Han, Daming Li, Hanyuan Shi 等ISSTA 2026
- Verified from Scratch: Program Analysis for Learners' ProgramsAndreas Stahlbauer, Christoph Frädrich, Gordon FraserASE 2020 · 7 次引用
- Empirical study of transformers for source codeNadezhda Chirkova, Sergey TroshinFSE 2021 · 53 次引用
- Large Language Model Powered Symbolic ExecutionYihe Li, Ruijie Meng, Gregory J. DuckOOPSLA 2025 · 12 次引用
