计算机科学 > 程序设计语言
[提交于 2025年10月18日]
标题:SimpliPy: A Source-Tracking Notional Machine for Simplified Python
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Misconceptions about program execution hinder many novice programmers. We introduce SimpliPy, a notional machine designed around a carefully chosen Python subset to clarify core control flow and scoping concepts. Its foundation is a precise operational semantics that explicitly tracks source code line numbers for each execution step, making the link between code and behavior unambiguous. Complementing the dynamic semantics, SimpliPy uses static analysis to generate Control Flow Graphs (CFGs) and identify lexical scopes, helping students build a structural understanding before tracing. We also present an interactive web-based debugger built on these principles. This tool embodies the formal techniques, visualizing the operational state (environments, stack) and using the static CFG to animate control flow directly on the graph during step-by-step execution. SimpliPy thus integrates formal semantics, program analysis, and visualization to offer both a pedagogical approach and a practical demonstration of applying formal methods to program understanding.
提交历史
来自:Moida Praneeth Jain[v1] 2025年10月18日 星期六 17:48:25 UTC