The application discloses a
source code processing method,
computer equipment and program product, and relates to the technical field of
computer program code analysis, and the method is characterized in that: an
abstract syntax tree is converted into a
hybrid code tree that integrates
data semantics and
control logic, unified standard node basic attributes and
semantic information of data nodes and control nodes that inherit a unified
base class are relied on, multiple independent intermediate representations are avoided to be built, and operation overhead in a code analysis process is reduced; the original parent-child hierarchical relationship of the
abstract syntax tree is completely retained in a conversion process by using the
hybrid code tree, sibling nodes in the same layer are arranged according to a
source code lexical analysis sequence, and
syntax, data and control
semantic information are integrated into a hierarchical clear
tree structure by combining the design of the data nodes and the control nodes in the
hybrid code tree, without additionally adding jump edges,
control flow edges and data flow edges, so that the query overhead of the analysis process and the
system maintenance complexity are reduced, and the method is suitable for various
source code analysis application scenarios such as
vulnerability detection and compliance audit.