Skip to main navigation Skip to search Skip to main content

Visualizing Program Behavior: A Study of Enhanced Program Diagrams Using LLM

  • Beihang University

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

This paper aims to address the difficulties faced by novice programmers in grasping code structure and execution flow, improving programming thinking, and pinpointing code errors with accuracy. It proposes providing students with program behavior diagrams based on large language models (LLMs) and visualization techniques to achieve personalized guidance. Specifically, these program behavior diagrams include programming thinking visualization diagrams and code vulnerability visualization diagrams. A programming thinking visualization diagram employs static code analysis to gather code structure information, combined with the structured chain-of-thought method to collectively optimize the LLM. This enables the LLM to explain each interpretable part of the code from top to bottom, detailing the programming concepts, and displaying them on a modularized code structure diagram. The code vulnerability visualization diagram primarily utilizes the fine-tuned LLM, optimizing it based on program analysis and clustering analysis methods to accurately identify vulnerabilities in student code and display them on a code flow diagram. Its feature is to visually display to students the error location, error information, and the impact of errors on program flow, rather than providing the programming answers. Lastly, through experiments and statistical analysis of actual teaching data, this paper serves a demonstration that the enhanced models used in the visualization diagram generation process have a noticeable effect on mainstream LLMs, and that visualization diagrams hold significant value for students at different stages of learning.

Original languageEnglish
Title of host publication2024 IEEE Frontiers in Education Conference, FIE 2024 - Proceedings
PublisherInstitute of Electrical and Electronics Engineers Inc.
ISBN (Electronic)9798350351507
DOIs
StatePublished - 2024
Event54th IEEE Frontiers in Education Conference, FIE 2024 - Washington, United States
Duration: 13 Oct 202416 Oct 2024

Publication series

NameProceedings - Frontiers in Education Conference, FIE
ISSN (Print)1539-4565

Conference

Conference54th IEEE Frontiers in Education Conference, FIE 2024
Country/TerritoryUnited States
CityWashington
Period13/10/2416/10/24

Keywords

  • Code Analysis
  • Code Flowchart
  • Code Vulnerabilities
  • Computer Education
  • Large Language Models
  • Structured Chain-of-thought

Fingerprint

Dive into the research topics of 'Visualizing Program Behavior: A Study of Enhanced Program Diagrams Using LLM'. Together they form a unique fingerprint.

Cite this