In this paper, a method to initiate, develop and visualize an abstract syntax tree (AST) in C++ source code is presented. The approach is in chronological order starting with collection of program codes as a string an...In this paper, a method to initiate, develop and visualize an abstract syntax tree (AST) in C++ source code is presented. The approach is in chronological order starting with collection of program codes as a string and split into individual characters using regular expression. This will be followed by separating the token grammar using best first search (BFS) algorithm to determine node having lowest value, lastly followed by graph presentation of intermediate representation achieved with the help of graph visualization software (GraphViz) while former is implemented using python programming language version 3. The efficacy of our approach is used in analyzing C++ code and yielded a satisfactory result.展开更多
针对传统编程作业批改效率偏低、主观性突出及现有自动化工具评测维度单一的现实问题,文章构建了融合大语言模型(Large Language Model,LLM)与抽象语法树(Abstract Syntax Tree,AST)的全维度评测系统。该系统借助AST解析提取代码结构特...针对传统编程作业批改效率偏低、主观性突出及现有自动化工具评测维度单一的现实问题,文章构建了融合大语言模型(Large Language Model,LLM)与抽象语法树(Abstract Syntax Tree,AST)的全维度评测系统。该系统借助AST解析提取代码结构特征,结合LLM的语义理解能力,对代码正确性、逻辑完备性及编程规范性进行多维度评估,同时引入知识图谱构建错因归溯与补救建议,依托指令工程生成个性化反馈内容。实验数据显示,该系统在函数题、类与对象题等典型题型中的综合评分准确率达89.1%,反馈有效性平均得分为4.05分,批改效率提升幅度达85%,可助力智能化教学实践。展开更多
文摘In this paper, a method to initiate, develop and visualize an abstract syntax tree (AST) in C++ source code is presented. The approach is in chronological order starting with collection of program codes as a string and split into individual characters using regular expression. This will be followed by separating the token grammar using best first search (BFS) algorithm to determine node having lowest value, lastly followed by graph presentation of intermediate representation achieved with the help of graph visualization software (GraphViz) while former is implemented using python programming language version 3. The efficacy of our approach is used in analyzing C++ code and yielded a satisfactory result.
文摘针对传统编程作业批改效率偏低、主观性突出及现有自动化工具评测维度单一的现实问题,文章构建了融合大语言模型(Large Language Model,LLM)与抽象语法树(Abstract Syntax Tree,AST)的全维度评测系统。该系统借助AST解析提取代码结构特征,结合LLM的语义理解能力,对代码正确性、逻辑完备性及编程规范性进行多维度评估,同时引入知识图谱构建错因归溯与补救建议,依托指令工程生成个性化反馈内容。实验数据显示,该系统在函数题、类与对象题等典型题型中的综合评分准确率达89.1%,反馈有效性平均得分为4.05分,批改效率提升幅度达85%,可助力智能化教学实践。