🤖 AI Summary
Large language models (LLMs) struggle to directly analyze or assist with block-based programming environments (e.g., Scratch) due to their non-textual, structural representation.
Method: This paper introduces the first scalable framework that deeply integrates LLMs with static code analysis, embedded in the open-source tool LitterBox. It precisely parses Scratch block structures and converts them into semantically faithful textual representations—enabling LLM comprehension—and provides a lightweight API supporting multi-LLM orchestration, dynamic query processing, and generative repair code synthesis, all seamlessly integrated into the Scratch interface.
Contribution/Results: The framework establishes the first LLM-driven static analysis and generative feedback loop for block-based programs. Its modular architecture supports diverse LLM backends and customizable analysis tasks. Empirical evaluation demonstrates its effectiveness and usability in code quality diagnostics and pedagogical support.
📝 Abstract
Large language models (LLMs) have become an essential tool to support developers using traditional text-based programming languages, but the graphical notation of the block-based Scratch programming environment inhibits the use of LLMs. To overcome this limitation, we propose the LitterBox+ framework that extends the Scratch static code analysis tool LitterBox with the generative abilities of LLMs. By converting block-based code to a textual representation suitable for LLMs, LitterBox+ allows users to query LLMs about their programs, about quality issues reported by LitterBox, and it allows generating code fixes. Besides offering a programmatic API for these functionalities, LitterBox+ also extends the Scratch user interface to make these functionalities available directly in the environment familiar to learners. The framework is designed to be easily extensible with other prompts, LLM providers, and new features combining the program analysis capabilities of LitterBox with the generative features of LLMs. We provide a screencast demonstrating the tool at https://youtu.be/RZ6E0xgrIgQ.