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%,可助力智能化教学实践。展开更多
Most solutions for detecting buffer overflow are based on source code. But the requirement tor source code is not always practical especially for business software. A new approach was presented to detect statically th...Most solutions for detecting buffer overflow are based on source code. But the requirement tor source code is not always practical especially for business software. A new approach was presented to detect statically the potential buffer overflow vulnerabilities in the binary code of software. The binary code was translated into assembly code without the lose of the information of string operation functions. The feature code abstract graph was constructed to generate more accurate constraint statements, and analyze the assembly code using the method of integer range constraint. After getting the elementary report on suspicious code where buffer overflows possibly happen, the control flow sensitive analysis using program dependence graph was done to decrease the rate of false positive. A prototype was implemented which demonstrates the feasibility and efficiency of the new approach.展开更多
文摘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%,可助力智能化教学实践。
文摘Most solutions for detecting buffer overflow are based on source code. But the requirement tor source code is not always practical especially for business software. A new approach was presented to detect statically the potential buffer overflow vulnerabilities in the binary code of software. The binary code was translated into assembly code without the lose of the information of string operation functions. The feature code abstract graph was constructed to generate more accurate constraint statements, and analyze the assembly code using the method of integer range constraint. After getting the elementary report on suspicious code where buffer overflows possibly happen, the control flow sensitive analysis using program dependence graph was done to decrease the rate of false positive. A prototype was implemented which demonstrates the feasibility and efficiency of the new approach.