Lune

ICSE2023Top-tier venue

On the Applicability of Language Models to Block-Based Programs

Elisabeth Griebl, Benedikt Fein, Florian Obermüller, Gordon Fraser, René Just

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • GraphCodeBERT: Pre-training Code Representations with Data Flow cites Code Prediction by Feeding Trees to Transformers
  • Code Prediction by Feeding Trees to Transformers cites Big code != big vocabulary: open-vocabulary models for source code
  • Multi-task Learning based Pre-trained Language Model for Code Completion cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Multi-task Learning based Pre-trained Language Model for Code Completion cites Code Prediction by Feeding Trees to Transformers
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. RePurr: Automated Repair of Block-Based Learners' ProgramsSebastian Schweikl, Gordon FraserFSE 2025

Builds on6

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan et al.EMNLP Findings 2020 · 2,828 citations
  2. GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng et al.ICLR 2021 · 1,644 citations
  3. Code Prediction by Feeding Trees to TransformersSeohyun Kim, Jinman Zhao, Yuchi Tian, Satish ChandraICSE 2021 · 179 citations
  4. Multi-task Learning based Pre-trained Language Model for Code CompletionFang Liu, Ge Li, Yunfei Zhao, Zhi JinASE 2020 · 162 citations
  5. Big code != big vocabulary: open-vocabulary models for source codeRafael-Michael Karampatsis, Hlib Babii, Romain Robbes, Charles Sutton et al.ICSE 2020 · 140 citations

Related papers

  1. VisionScratch: LLM-Based Automated Feedback Generation using Code-Produced Videos for Scratch ProgramsYuan Si, Daming Li, Hanyuan Shi, Jialu ZhangFSE 2026 · 1 citation
  2. ScratchNet: A Multi-modal Benchmark for Evaluating and Advancing LLMs on Scratch Programming TasksYuan Si, Simeng Han, Daming Li, Hanyuan Shi et al.ISSTA 2026
  3. Verified from Scratch: Program Analysis for Learners' ProgramsAndreas Stahlbauer, Christoph Frädrich, Gordon FraserASE 2020 · 7 citations
  4. Empirical study of transformers for source codeNadezhda Chirkova, Sergey TroshinFSE 2021 · 53 citations
  5. Large Language Model Powered Symbolic ExecutionYihe Li, Ruijie Meng, Gregory J. DuckOOPSLA 2025 · 12 citations
Dusk over the sea between two cliffs drawn in fine vertical lines