应用一种Petri网扩展CNets,描述程序代码中所隐含着的数据与控制,分别给出了程序代码的数据视图和控制视图,在CNets规范的基础上,研究程序中的数据与控制流之间的交互以及程序中数据、操作和资源之间的关系,同时给出CNets规范向经典Petri网规范的转换规则.在不运行程序的前提下,根据这一映射机制,通过CNets规范,利用经典Petri网理论对程序的性质进行分析.%To describe the implicit data and the implicit control in program code, Cnets, one extension of Petri nets, is applied. By data view nets and control view nets, data and control of the program code are modeled. Based on the Cnets specification, interactions between data flow and control flow, relations among data, operations, and resources are also captured respectively. Meanwhile, mapping rules from Cnets specification to Petri nets are presented. According to the rules, from Cnets specification, properties of the program are analysized through Petri nets techniques without a running a program.
展开▼