CN116755704A - Real-time code generation method for rule behavior model based on rule description files - Google Patents
Real-time code generation method for rule behavior model based on rule description files Download PDFInfo
- Publication number
- CN116755704A CN116755704A CN202310546534.3A CN202310546534A CN116755704A CN 116755704 A CN116755704 A CN 116755704A CN 202310546534 A CN202310546534 A CN 202310546534A CN 116755704 A CN116755704 A CN 116755704A
- Authority
- CN
- China
- Prior art keywords
- rule
- expression
- abstract syntax
- syntax tree
- sub
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
技术领域Technical field
本发明涉及计算机生成兵力技术领域,具体涉及一种基于规则描述文件的规则行为模型实时代码生成方法。The invention relates to the technical field of computer-generated military forces, and specifically relates to a real-time code generation method for a rule behavior model based on a rule description file.
背景技术Background technique
利用计算机生成兵力技术进行战术研究是一个备受关注的研究领域,这种应用场景对作战仿真系统的执行速度有较高的要求。因此,如何提高计算机生成兵力模型的执行效率是一个需要解决的技术难题。The use of computer-generated force technology for tactical research is a research field that has attracted much attention. This application scenario has high requirements on the execution speed of the combat simulation system. Therefore, how to improve the execution efficiency of computer-generated force models is a technical problem that needs to be solved.
在基于规则集的行为建模过程中,存在着执行效率与开发、维护效率间的取舍。硬编码规则得到的规则行为模型可以直接通过编译器编译为机器码,具有较好的执行效率,然而通用编程语言并非为规则行为建模而设计,利用其编写的规则集模型结构较不清晰,导致存在一定的开发难度,且后期难以维护;使用专用规则建模工具可以得到结构清晰的规则行为模型,然而其一般只能得到特定格式的规则表示并在执行时交由规则解释引擎解释执行,存在执行效率上的缺陷。In the process of behavioral modeling based on rule sets, there is a trade-off between execution efficiency and development and maintenance efficiency. The rule behavior model obtained by hard-coded rules can be directly compiled into machine code through the compiler, which has good execution efficiency. However, general programming languages are not designed for rule behavior modeling, and the structure of the rule set model written using it is less clear. This results in a certain degree of difficulty in development and maintenance in the later stage. Using special rule modeling tools can obtain a clearly structured rule behavior model. However, it generally can only obtain rule representation in a specific format and hand it over to the rule interpretation engine for interpretation and execution during execution. There are flaws in execution efficiency.
综上,现有技术中存在无法兼顾模型的开发、维护效率和模型的执行效率的问题。In summary, there is a problem in the existing technology that cannot take into account the efficiency of model development and maintenance and the efficiency of model execution.
发明内容Contents of the invention
鉴于上述问题,本发明提供了一种基于规则描述文件的规则行为模型实时代码生成方法,解决了现有技术中无法兼顾模型的开发、维护效率和模型的执行效率的问题。In view of the above problems, the present invention provides a real-time code generation method for a rule behavior model based on a rule description file, which solves the problem in the prior art that the development and maintenance efficiency of the model and the execution efficiency of the model cannot be taken into consideration.
本发明提供了一种基于规则描述文件的规则行为模型实时代码生成方法,包括如下步骤:The present invention provides a real-time code generation method for a rule behavior model based on a rule description file, which includes the following steps:
步骤S1.获取规则描述文件,并对其进行解析,得到规则集元信息和包含若干个子规则集的规则集;其中,所述子规则集包括若干个原子规则,每个原子规则包括原子规则前件表达式和原子规则后件表达式;Step S1. Obtain the rule description file and parse it to obtain the rule set meta-information and a rule set containing several sub-rule sets; wherein the sub-rule set includes several atomic rules, and each atomic rule includes the prefix of the atomic rule. Part expressions and atomic rule postpart expressions;
步骤S2.对所述前件表达式和后件表达式进行词法分析处理,该处理包括拆分和转换,得到表达式符号流;Step S2. Perform lexical analysis on the antecedent expression and the consequent expression, which includes splitting and conversion to obtain an expression symbol stream;
步骤S3.基于递归下降算法和算符优先分析算法,对所述表达式符号流进行语法分析处理,构建得到表达式抽象语法树;Step S3. Based on the recursive descent algorithm and operator priority analysis algorithm, perform syntax analysis on the expression symbol stream to construct an expression abstract syntax tree;
步骤S4.对所述表达式抽象语法树进行语义分析处理,得到校验后的表达式抽象语法树;Step S4. Perform semantic analysis and processing on the expression abstract syntax tree to obtain a verified expression abstract syntax tree;
步骤S5.基于各子规则集所对应的所述校验后的表达式抽象语法树,经构建得到各子规则集的抽象语法树;合并各子规则集的抽象语法树,得到规则集的抽象语法树;Step S5. Based on the verified expression abstract syntax tree corresponding to each sub-rule set, construct an abstract syntax tree for each sub-rule set; merge the abstract syntax trees of each sub-rule set to obtain an abstraction of the rule set syntax tree;
步骤S6.基于所述规则集的抽象语法树,遍历所有子规则集及原子规则,进行插入读取变量的函数调用处理,得到用于生成代码的抽象语法树;Step S6. Based on the abstract syntax tree of the rule set, traverse all sub-rule sets and atomic rules, perform function call processing to insert read variables, and obtain the abstract syntax tree used to generate code;
步骤S7.遍历所述用于生成代码的抽象语法树中的每一个节点,生成硬编码行为模型源码,再将其与平台接口源码进行组合编译,得到规则行为模型。Step S7. Traverse each node in the abstract syntax tree used to generate code, generate the hard-coded behavior model source code, and then combine and compile it with the platform interface source code to obtain the rule behavior model.
进一步地,所述步骤S1具体包括如下子步骤:Further, the step S1 specifically includes the following sub-steps:
步骤S101.利用规则编辑工具,从知识库中导出得到规则描述文件;Step S101. Use the rule editing tool to export the rule description file from the knowledge base;
步骤S102.利用规则集描述文件解析工具,对所述规则描述文件进行解析,得到规则集元信息和包含若干个子规则集的规则集,存储所述规则集元信息至用于记录规则集元信息的数据结构;其中,所述规则集元信息包括复杂数据类型定义、输入态势变量信息、输出动作变量信息和中间状态缓存变量信息;Step S102. Use a rule set description file parsing tool to parse the rule description file to obtain rule set meta-information and a rule set containing several sub-rule sets, and store the rule set meta-information to record the rule set meta-information. The data structure; wherein, the rule set meta-information includes complex data type definition, input situation variable information, output action variable information and intermediate state cache variable information;
步骤S103.利用规则集描述文件解析工具,依次遍历规则描述文件中的每个子规则集的每条原子规则,获取每个子规则集中的每条原子规则的前件表达式和后件表达式,并对其编号。Step S103. Use the rule set description file parsing tool to sequentially traverse each atomic rule of each sub-rule set in the rule description file, obtain the precondition expression and postcondition expression of each atomic rule in each sub rule set, and Number it.
进一步地,所述步骤S2具体包括如下子步骤:Further, the step S2 specifically includes the following sub-steps:
步骤S201.判断前件表达式或后件表达式的当前字符是否为空白符,如果是则将当前字符指针加一,直至当前字符不是空白符;Step S201. Determine whether the current character of the antecedent expression or the consequent expression is a whitespace character. If so, add one to the current character pointer until the current character is not a whitespace character;
步骤S202.判断当前字符类型,如果是0~9的数字则执行步骤S203-A,如果是下划线或英文字母则执行步骤S203-B,否则执行步骤S203-C;Step S202. Determine the current character type. If it is a number from 0 to 9, execute step S203-A. If it is an underline or an English letter, execute step S203-B. Otherwise, execute step S203-C;
步骤S203-A.从当前字符起,持续读入字符直至遇到空白符或符号,并将读入的片段以数字字面量类型返回;Step S203-A. Starting from the current character, continue to read characters until a blank character or symbol is encountered, and return the read fragment as a numeric literal type;
步骤S203-B.从当前字符起,持续读入字符直至遇到空白符或符号,并判断读入的字符串是否为关键字,若是则将读入的片段以关键字类型返回,否则将读入的片段以标识符类型返回;Step S203-B. Starting from the current character, continue to read characters until a blank character or symbol is encountered, and determine whether the read string is a keyword. If so, return the read fragment as a keyword type, otherwise read The entered fragment is returned as identifier type;
步骤S203-C.读入该字符,并将包含该字符的片段以符号类型返回;Step S203-C. Read the character and return the fragment containing the character in symbol type;
步骤S204.对步骤S1得到的所有前件表达式和后件表达式执行步骤S201~步骤S202,得到表达式符号流。Step S204. Execute steps S201 to S202 on all antecedent expressions and consequent expressions obtained in step S1 to obtain an expression symbol stream.
进一步地,所述步骤S3具体包括如下子步骤:Further, the step S3 specifically includes the following sub-steps:
步骤S301.判断表达式符号流中的当前符号是否为前缀运算符,若是则读入该前缀运算符,获取其对应的前缀表达式;若不是则当前符号对应的是基本表达式,对其执行步骤S302;Step S301. Determine whether the current symbol in the expression symbol stream is a prefix operator. If so, read the prefix operator and obtain its corresponding prefix expression; if not, the current symbol corresponds to a basic expression and execute it. Step S302;
对剩余的表达式符号流继续进行前缀运算符的判断和暂存,直至读入所述表达式符号流中所有的前缀运算符及其对应的前缀表达式,构建得到各前缀表达式对应的抽象语法树;Continue to judge and temporarily store prefix operators on the remaining expression symbol streams until all prefix operators and their corresponding prefix expressions in the expression symbol stream are read, and the abstraction corresponding to each prefix expression is constructed. syntax tree;
步骤S302.判断基本表达式的当前符号是字面量还是标识符,若是字面量,则执行步骤S303;若是标识符,则执行步骤S304;Step S302. Determine whether the current symbol of the basic expression is a literal or an identifier. If it is a literal, perform step S303; if it is an identifier, perform step S304;
步骤S303.读入基本表达式的当前符号,构建字面量对应的抽象语法树,然后执行步骤S305;Step S303. Read the current symbol of the basic expression, construct an abstract syntax tree corresponding to the literal, and then execute step S305;
步骤S304.读入基本表达式的当前符号,构建标识符对应的抽象语法树,然后判断后续符号是否是结构体成员访问、数组成员访问和函数调用对应的运算符,若是,则缓存该运算符并对剩余表达式符号流继续执行步骤S302,利用所述标识符对应的抽象语法树与步骤S303得到的所述字面量对应的抽象语法树,构建结构体成员访问、数组成员访问和函数调用的抽象语法树,然后执行步骤S305;若不是,则直接执行步骤S305;Step S304. Read the current symbol of the basic expression, construct an abstract syntax tree corresponding to the identifier, and then determine whether the subsequent symbol is an operator corresponding to structure member access, array member access, and function call. If so, cache the operator. And continue to execute step S302 for the remaining expression symbol stream, using the abstract syntax tree corresponding to the identifier and the abstract syntax tree corresponding to the literal obtained in step S303 to construct structure member access, array member access and function calling. abstract syntax tree, and then execute step S305; if not, execute step S305 directly;
步骤S305.判断当前符号是否是中缀运算符,若是,则利用算符优先分析算法,基于该中缀运算符对应的中缀表达式,构建得到中缀表达式对应的抽象语法树;若不是,则直接保存当前已构建出的抽象语法树;Step S305. Determine whether the current symbol is an infix operator. If so, use the operator priority analysis algorithm to construct an abstract syntax tree corresponding to the infix expression based on the infix expression corresponding to the infix operator; if not , then directly save the currently constructed abstract syntax tree;
步骤S306.对表达式符号流执行步骤S302~步骤S306,并结合步骤S301得到的前缀表达式对应的抽象语法树,得到表达式抽象语法树。Step S306: Execute steps S302 to S306 on the expression symbol stream, and combine it with the abstract syntax tree corresponding to the prefix expression obtained in step S301 to obtain an expression abstract syntax tree.
进一步地,所述步骤S4具体包括如下子步骤:Further, the step S4 specifically includes the following sub-steps:
步骤S401.基于步骤S102中所述数据结构记录的规则集元信息,判断表达式抽象语法树的当前节点类型,如果是标识符或字面量节点,则查询并更新当前节点类型后返回;如果是函数调用节点,则执行步骤S402-A;如果是成员访问操作,则执行步骤S402-B;如果是中缀运算节点,则执行步骤S402-C;Step S401. Based on the rule set meta-information recorded in the data structure described in step S102, determine the current node type of the expression abstract syntax tree. If it is an identifier or literal node, query and update the current node type and return; if it is If it is a function call node, execute step S402-A; if it is a member access operation, execute step S402-B; if it is an infix operation node, execute step S402-C;
步骤S402-A.对函数调用的每一个实参节点执行步骤S401,然后根据函数参数类型查找函数重载表,选择函数形参类型与调用的实参类型匹配的真实函数替换函数调用,更新当前节点的返回类型并返回;Step S402-A. Execute step S401 for each actual parameter node of the function call, then search the function overload table according to the function parameter type, select the real function that matches the function parameter type and the called actual parameter type to replace the function call, and update the current The return type of the node and returned;
步骤S402-B.对被访问的值对应的节点执行步骤S401,然后查找类型定义判断当前成员访问是否可行,若可行则将当前节点的返回类型更新为成员类型并返回;若不可行,则直接返回;Step S402-B. Execute step S401 on the node corresponding to the accessed value, and then search the type definition to determine whether the current member access is feasible. If it is feasible, update the return type of the current node to the member type and return; if not, directly return;
步骤S402-C.对参与中缀运算的左侧值和右侧值执行步骤S401,然后判断左侧值和右侧值的类型是否均为实数类型,若是则将当前节点的返回类型更新为实数类型并返回;若不是,则直接返回;Step S402-C. Execute step S401 on the left value and the right value participating in the infix operation, and then determine whether the types of the left value and the right value are both real number types. If so, update the return type of the current node to a real number. type and return; if not, return directly;
步骤S403.对表达式抽象语法树的所有节点执行步骤S401,得到校验后的表达式抽象语法树。Step S403. Execute step S401 on all nodes of the expression abstract syntax tree to obtain the verified expression abstract syntax tree.
进一步地,所述步骤S5具体包括如下子步骤:Further, the step S5 specifically includes the following sub-steps:
步骤S501.在所述校验后的表达式抽象语法树上的一个原子规则上新建一个条件分支节点,构建形如IF-THEN-ELSE的条件分支语句,使该原子规则的前件表达式作为所述条件分支语句的条件表达式,该原子规则的后件表达式作为所述条件分支语句的条件表达式,剩余原子规则对应的抽象语法树作为所述条件分支语句的假值分支;对一个子规则集中的每一个原子规则递归进行上述处理,得到由一系列条件分支语句和条件分支节点连接起来的子规则集的抽象语法树;Step S501. Create a new conditional branch node on an atomic rule on the verified expression abstract syntax tree, and construct a conditional branch statement in the shape of IF-THEN-ELSE, so that the antecedent expression of the atomic rule is as The conditional expression of the conditional branch statement, the consequent expression of the atomic rule is used as the conditional expression of the conditional branch statement, and the abstract syntax tree corresponding to the remaining atomic rules is used as the false value branch of the conditional branch statement; for a Each atomic rule in the sub-rule set recursively undergoes the above processing to obtain an abstract syntax tree of the sub-rule set connected by a series of conditional branch statements and conditional branch nodes;
步骤S502.对每个子规则集执行步骤S501,得到各子规则集的抽象语法树;Step S502. Execute step S501 for each sub-rule set to obtain the abstract syntax tree of each sub-rule set;
步骤S503.合并各子规则集的抽象语法树,得到规则集的抽象语法树。Step S503. Merge the abstract syntax trees of each sub-rule set to obtain the abstract syntax tree of the rule set.
进一步地,所述步骤S6具体包括如下子步骤:Further, the step S6 specifically includes the following sub-steps:
步骤S601.构建用于记录已加载态势变量名称的集合,该集合初始为空;Step S601. Construct a set for recording the names of loaded situation variables. The set is initially empty;
步骤S602.遍历当前原子规则的前件表达式与后件表达式的抽象语法树节点,在所述用于记录已加载态势变量名称的集合中,查找已加载态势变量名称,并在前件表达式之前添加不包含于所述集合中的态势变量名称对应的态势变量读入函数的函数调用;将所有访问到的态势变量名称储存至所述集合中;Step S602. Traverse the abstract syntax tree nodes of the antecedent expression and the consequent expression of the current atomic rule, find the name of the loaded situation variable in the set used to record the names of loaded situation variables, and use it in the antecedent expression. Before the formula, add a function call of the situation variable reading function corresponding to the situation variable name that is not included in the set; store all accessed situation variable names into the set;
步骤S603.在所述规则集的抽象语法树中,遍历各子规则集的各原子规则,执行步骤S602,直至将各个抽象语法树节点访问的所有态势变量名称储存至所述集合中,得到用于生成代码的抽象语法树。Step S603. In the abstract syntax tree of the rule set, traverse each atomic rule of each sub-rule set, and execute step S602 until all situation variable names accessed by each abstract syntax tree node are stored in the set, and the user Abstract syntax tree for generating code.
进一步地,所述步骤S7具体包括如下子步骤:Further, the step S7 specifically includes the following sub-steps:
步骤S701.遍历用于代码生成的抽象语法树的节点,将用于代码生成的抽象语法树转换为对应的C/C++代码,将其录入到源代码文件,并生成对应的头文件;Step S701. Traverse the nodes of the abstract syntax tree used for code generation, convert the abstract syntax tree used for code generation into the corresponding C/C++ code, enter it into the source code file, and generate the corresponding header file;
步骤S702.整理平台接口模板,填充接口源码中与行为模型有关的操作,包括输入态势变量与中间状态变量的读入函数;Step S702. Organize the platform interface template and fill in the operations related to the behavioral model in the interface source code, including the read functions for input situation variables and intermediate state variables;
步骤S703.调用构建系统对步骤S701得到的源代码文件和头文件,与步骤S702整理好的接口模板进行构建,并调用编译器编译生成规则行为模型;其中,所述规则行为模型指可用于特定计算机生成兵力仿真平台的动态库或可执行文件。Step S703. Call the construction system to build the source code file and header file obtained in step S701 and the interface template compiled in step S702, and call the compiler to compile and generate a rule behavior model; wherein the rule behavior model refers to a rule behavior model that can be used for specific The dynamic library or executable file of the computer-generated force simulation platform.
与现有技术相比,本发明至少具有现如下有益效果:Compared with the prior art, the present invention at least has the following beneficial effects:
(1)与现有硬编码规则建模相比,本发明的基于规则描述文件的规则行为模型实时代码生成方法,利用规则建模工具而无需手工硬编码,简化规则建模流程并提升得到的规则行为模型的可维护性,便于进行后续开发。(1) Compared with existing hard-coded rule modeling, the real-time code generation method of the rule behavior model based on the rule description file of the present invention uses rule modeling tools without manual hard coding, simplifying the rule modeling process and improving the obtained The maintainability of the rule behavior model facilitates subsequent development.
(2)与现有利用规则解释推理引擎解释执行规则描述文件的执行方法相比,本发明的基于规则描述文件的规则行为模型实时代码生成方法,能够将特定格式的规则描述文件转换为等价的硬编码规则行为模型而无需使用规则解释推理引擎,提高规则行为模型的执行效率。(2) Compared with the existing execution method that uses a rule interpretation inference engine to interpret and execute rule description files, the real-time code generation method of the rule behavior model based on the rule description file of the present invention can convert the rule description file in a specific format into an equivalent The hard-coded rule behavior model does not require the use of a rule interpretation inference engine to improve the execution efficiency of the rule behavior model.
(3)与现有使用FPGA或GPU等专用硬件进行加速的方法相比,本发明的基于规则描述文件的规则行为模型实时代码生成方法,对特定硬件没有需求,生成的代码符合C/C++语言规范,只要某后端平台(如x86/arm等)存在C/C++编译器就可以编译生成的行为模型代码从而加速,则可以在该后端平台运行,而大部分后端平台都存在C/C++编译器,因此本方法泛用性强。(3) Compared with the existing acceleration methods using dedicated hardware such as FPGA or GPU, the real-time code generation method of the rule behavior model based on the rule description file of the present invention has no requirement for specific hardware, and the generated code conforms to the C/C++ language Specification, as long as a C/C++ compiler exists on a certain back-end platform (such as x86/arm, etc.), the generated behavioral model code can be compiled and accelerated, and it can be run on the back-end platform, and most back-end platforms have C/C++ compilers. C++ compiler, so this method is highly versatile.
附图说明Description of the drawings
附图仅用于示出具体实施例的目的,而并不认为是对本发明的限制。The drawings are for the purpose of illustrating specific embodiments only and are not to be construed as limitations of the invention.
图1为本发明实施例公开的基于规则描述文件的规则行为模型实时代码生成方法的流程图;Figure 1 is a flow chart of a real-time code generation method for a rule behavior model based on a rule description file disclosed in an embodiment of the present invention;
图2为本发明实施例公开的基于规则描述文件的规则行为模型实时代码生成方法所用到的规则描述文件的示意图;Figure 2 is a schematic diagram of a rule description file used in a real-time code generation method for a rule behavior model based on a rule description file disclosed in an embodiment of the present invention;
图3为本发明实施例公开的基于规则描述文件的规则行为模型实时代码生成方法中表达式解析的流程图;Figure 3 is a flow chart of expression parsing in the real-time code generation method of the rule behavior model based on the rule description file disclosed by the embodiment of the present invention;
图4为本发明实施例公开的基于规则描述文件的规则行为模型实时代码生成方法中的表达式解析工具词法分析流程。Figure 4 is a lexical analysis process of the expression parsing tool in the real-time code generation method of the rule behavior model based on the rule description file disclosed in the embodiment of the present invention.
具体实施方式Detailed ways
为了能够更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施方式对本发明进行进一步的详细描述。需要说明的是,在不冲突的情况下,本发明的实施例及实施例中的特征可以相互组合。另外,本发明还可以采用其他不同于在此描述的其他方式来实施,因此,本发明的保护范围并不受下面公开的具体实施例的限制。In order to more clearly understand the above objects, features and advantages of the present invention, the present invention will be described in further detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, as long as there is no conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In addition, the present invention can also be implemented in other ways different from those described here. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
实施例1Example 1
本发明的一个具体实施例,如图1所示,公开了一种基于规则描述文件的规则行为模型实时代码生成方法,包括如下步骤:A specific embodiment of the present invention, as shown in Figure 1, discloses a real-time code generation method for a rule behavior model based on a rule description file, which includes the following steps:
步骤S1.获取规则描述文件,并对其进行解析,得到规则集元信息和包含若干个子规则集的规则集;其中,子规则集包括若干个原子规则,每个原子规则包括原子规则前件表达式和原子规则后件表达式。Step S1. Obtain the rule description file and parse it to obtain the rule set meta-information and a rule set containing several sub-rule sets; among which, the sub-rule set includes several atomic rules, and each atomic rule includes an atomic rule precondition expression. expressions and atomic rule consequent expressions.
步骤S2.对前件表达式和后件表达式进行词法分析处理,该处理包括拆分和转换,得到表达式符号流;其中,前件表达式和后件表达式为字符串形式。Step S2. Perform lexical analysis on the antecedent expression and the consequent expression, which includes splitting and conversion to obtain an expression symbol stream; wherein the antecedent expression and the consequent expression are in the form of strings.
步骤S3.基于递归下降算法和算符优先分析算法,对表达式符号流进行语法分析处理,构建得到表达式抽象语法树。Step S3. Based on the recursive descent algorithm and operator priority analysis algorithm, syntax analysis is performed on the expression symbol stream to construct an expression abstract syntax tree.
步骤S4.对表达式抽象语法树进行语义分析处理,判断对输入态势变量信息的访问是否符合规则集元信息中声明的态势变量类型,得到校验后的表达式抽象语法树;其中,Step S4. Perform semantic analysis and processing on the expression abstract syntax tree, determine whether the access to the input situation variable information conforms to the situation variable type declared in the rule set meta-information, and obtain the verified expression abstract syntax tree; where,
对输入态势变量信息的访问指表达式对变量的访问,示例性的,如表达式“x=p.x+2”即访问了x和p两个变量;规则集元信息中声明的态势变量类型则基于步骤102中存储规则集元信息的集合得到;这里的判断主要指实施例2中步骤403中“判断当前成员访问是否可行”和步骤404中“判断两个类型是否均为实数类型”,其余步骤都是为了给这两个判断提供信息。Access to input situation variable information refers to the access to variables by expressions. For example, the expression "x=p.x+2" accesses two variables, x and p; situation variables declared in the rule set meta-information The type is obtained based on the set of meta-information of the rule set stored in step 102; the judgment here mainly refers to "judge whether the current member access is feasible" in step 403 in Embodiment 2 and "judge whether both types are real number types" in step 404. , the remaining steps are to provide information for these two judgments.
步骤S5.基于各子规则集所对应的校验后的表达式抽象语法树,经构建得到各子规则集的抽象语法树;合并各子规则集的抽象语法树,得到规则集的抽象语法树。Step S5. Based on the verified expression abstract syntax tree corresponding to each sub-rule set, the abstract syntax tree of each sub-rule set is constructed; merge the abstract syntax trees of each sub-rule set to obtain the abstract syntax tree of the rule set .
步骤S6.基于规则集的抽象语法树,遍历所有子规则集及原子规则,进行插入读取变量的函数调用处理,得到用于生成代码的抽象语法树。Step S6. Based on the abstract syntax tree of the rule set, traverse all sub-rule sets and atomic rules, perform function call processing to insert read variables, and obtain the abstract syntax tree used to generate code.
如图3所示,为本发明实施例公开的基于规则描述文件的规则行为模型实时代码生成方法中表达式解析的流程,对应步骤S2~步骤S4。As shown in FIG. 3 , it is a process of expression parsing in the real-time code generation method of a rule behavior model based on a rule description file disclosed in the embodiment of the present invention, corresponding to steps S2 to S4.
插入读取变量的函数调用处理的作用在于,支持懒加载(Lazy Loading)避免未使用输入态势变量信息的冗余加载;其中,在访问输入态势变量与中间状态变量前都需要插入相应的函数调用以读入变量的实际值,并且,对每个输入态势变量与中间状态变量,在访问前都要进行插入读取该变量的函数调用;由于输出变量只需要写入而不需要读取对应的值,所以无需添加读入;懒加载是指在实际访问数据时才加载这个数据而不是在一开始就加载所有数据,属于“在第一次访问某个变量前插入读取该变量的函数调用”后的效果。The function of inserting the function call processing of reading variables is to support lazy loading (Lazy Loading) to avoid redundant loading of unused input situation variable information; among them, the corresponding function calls need to be inserted before accessing the input situation variables and intermediate state variables. to read the actual value of the variable, and for each input situation variable and intermediate state variable, a function call to insert and read the variable must be made before accessing; because the output variable only needs to be written and does not need to read the corresponding value, so there is no need to add reading; lazy loading means loading the data when the data is actually accessed instead of loading all the data at the beginning. It belongs to "inserting a function call to read a variable before accessing it for the first time. "After the effect.
步骤S7.遍历用于生成代码的抽象语法树中的每一个节点,生成硬编码行为模型源码,再将其与平台接口源码进行组合编译,得到规则行为模型;其中,Step S7. Traverse each node in the abstract syntax tree used to generate code, generate the hard-coded behavior model source code, and then compile it with the platform interface source code to obtain the rule behavior model; where,
本方案提出的实时代码生成方式生成的模型,与原有规则集行为模型,在仿真平台中的运行表现完全一致,可以直接替换;原有规则集行为模型指将规则解释推理引擎与规则描述文件进行组合后得到的模型。The model generated by the real-time code generation method proposed in this solution is completely consistent with the original rule set behavior model in the simulation platform and can be directly replaced; the original rule set behavior model refers to the combination of the rule interpretation inference engine and the rule description file The model obtained after combining.
与现有硬编码规则建模相比,本发明实施例的基于规则描述文件的规则行为模型实时代码生成方法,利用规则建模工具而无需手工硬编码,简化规则建模流程并提升得到的规则行为模型的可维护性,便于进行后续开发;与现有利用规则解释推理引擎解释执行规则描述文件的执行方法相比,本发明实施例的规则行为模型实时代码生成方法,能够将特定格式的规则描述文件转换为等价的硬编码规则行为模型而无需使用规则解释推理引擎,提高规则行为模型的执行效率;相较于现有使用FPGA或GPU等专用硬件进行加速的方法,本发明实施例的规则行为模型实时代码生成方法,对特定硬件没有需求,生成的代码符合C/C++语言规范,只要某后端平台(如x86/arm等)存在C/C++编译器就可以编译生成的行为模型代码从而加速,则可以在该后端平台运行,而大部分后端平台都存在C/C++编译器,因此本方法泛用性强。Compared with existing hard-coded rule modeling, the real-time code generation method for rule behavior models based on rule description files in the embodiment of the present invention uses rule modeling tools without manual hard coding, simplifying the rule modeling process and improving the obtained rules. The maintainability of the behavior model facilitates subsequent development; compared with the existing execution method that uses a rule interpretation inference engine to interpret and execute the rule description file, the real-time code generation method for the rule behavior model of the embodiment of the present invention can convert rules in a specific format The description file is converted into an equivalent hard-coded rule behavior model without using a rule interpretation inference engine, thereby improving the execution efficiency of the rule behavior model; compared with the existing method of using dedicated hardware such as FPGA or GPU for acceleration, the embodiment of the present invention The real-time code generation method of the rule behavior model does not require specific hardware. The generated code complies with the C/C++ language specification. As long as a C/C++ compiler exists on a certain back-end platform (such as x86/arm, etc.), the generated behavior model code can be compiled. Therefore, it can be accelerated and run on the back-end platform, and most back-end platforms have C/C++ compilers, so this method is highly versatile.
实施例2Example 2
在实施例1的基础上进行优化,步骤S1可进一步细化为如下子步骤:Based on the optimization in Embodiment 1, step S1 can be further refined into the following sub-steps:
步骤S101.利用规则编辑工具,从知识库中导出得到规则描述文件。Step S101. Use the rule editing tool to export the rule description file from the knowledge base.
具体来说,规则描述文件为XML格式,规则描述XML文件中包含规则集的输入态势变量信息、输出动作变量信息与中间状态变量信息、规则集推理过程中涉及的复杂数据类型定义以及规则集的若干个子规则集。Specifically, the rule description file is in XML format. The rule description XML file contains input situation variable information, output action variable information and intermediate state variable information of the rule set, complex data type definitions involved in the rule set reasoning process, and the rules of the rule set. Several sub-rule sets.
步骤S102.利用规则集描述文件解析工具,对规则描述文件进行解析,得到规则集元信息和包含若干个子规则集的规则集,如图2所示。Step S102. Use the rule set description file parsing tool to parse the rule description file to obtain rule set meta-information and a rule set containing several sub-rule sets, as shown in Figure 2.
存储规则集元信息至用于记录规则集元信息的数据结构;其中,Store rule set meta-information to a data structure used to record rule set meta-information; where,
规则集元信息包括复杂数据类型定义、输入态势变量信息、输出动作变量信息和中间状态缓存变量信息;存储时,将规则集元信息转换为便于程序处理的形式。Rule set meta-information includes complex data type definitions, input situation variable information, output action variable information and intermediate state cache variable information; when stored, the rule set meta-information is converted into a form that is convenient for program processing.
具体来说,输入态势变量信息包括输入态势变量名称及其类型;输出动作变量信息包括输出动作变量名称及其类型;中间状态变量信息包括中间状态变量名称及其类型;复杂数据指包含多个基础数据元素的数据,如位置数据就是一种包含经度、维度、高度三个浮点数元素的复杂数据。Specifically, the input situation variable information includes the input situation variable name and its type; the output action variable information includes the output action variable name and its type; the intermediate state variable information includes the intermediate state variable name and its type; complex data refers to the data containing multiple basic Data element data, such as location data, is a complex data containing three floating point elements: longitude, latitude, and height.
步骤S103.利用规则集描述文件解析工具,依次遍历规则描述文件中的每个子规则集的每条原子规则,获取每个子规则集中的每条原子规则的前件表达式和后件表达式,并对其编号;其中,Step S103. Use the rule set description file parsing tool to sequentially traverse each atomic rule of each sub-rule set in the rule description file, obtain the precondition expression and postcondition expression of each atomic rule in each sub rule set, and Number it; among them,
前件表达式指前件中输入态势变量的表达式,后件表达式指后件中输出动作变量的表达式。The antecedent expression refers to the expression of the input situation variable in the antecedent, and the consequent expression refers to the expression of the output action variable in the consequent.
如图4所示,步骤S2可进一步细化为如下子步骤:As shown in Figure 4, step S2 can be further refined into the following sub-steps:
步骤S201.判断前件表达式或后件表达式的当前字符是否为空白符,如果是则将当前字符指针加一,直至当前字符不是空白符。Step S201. Determine whether the current character of the antecedent expression or the consequent expression is a whitespace character. If so, increase the current character pointer by one until the current character is not a whitespace character.
步骤S202.判断当前字符类型,如果是0~9的数字则执行步骤S203-A,如果是下划线或英文字母则执行步骤S203-B,否则执行步骤S203-C。Step S202. Determine the current character type. If it is a number from 0 to 9, execute step S203-A. If it is an underline or an English letter, execute step S203-B. Otherwise, execute step S203-C.
步骤S203-A.从当前字符起,持续读入字符直至遇到空白符或符号,并将读入的片段以数字字面量类型返回。Step S203-A. Starting from the current character, continue reading characters until a blank character or symbol is encountered, and return the read fragment in a numeric literal type.
步骤S203-B.从当前字符起,持续读入字符直至遇到空白符或符号,并判断读入的字符串是否为关键字,若是则将读入的片段以关键字类型返回,否则将读入的片段以标识符类型返回。Step S203-B. Starting from the current character, continue to read characters until a blank character or symbol is encountered, and determine whether the read string is a keyword. If so, return the read fragment as a keyword type, otherwise read The incoming fragment is returned as an identifier type.
步骤S203-C.读入该字符,并将包含该字符的片段以符号类型返回。Step S203-C. Read the character and return the fragment containing the character in symbol type.
步骤S204.对步骤S1得到的所有前件表达式和后件表达式执行步骤S201~步骤S202,得到带标识类型的表达式符号流。Step S204. Execute steps S201 to S202 on all the antecedent expressions and consequent expressions obtained in step S1 to obtain an expression symbol stream with an identified type.
步骤S3可进一步细化为如下子步骤:Step S3 can be further refined into the following sub-steps:
步骤S301.判断表达式符号流中的当前符号是否为前缀运算符,若是则读入该前缀运算符,获取其对应的前缀表达式;若不是则当前符号对应的是基本表达式,对其执行步骤S302。Step S301. Determine whether the current symbol in the expression symbol stream is a prefix operator. If so, read the prefix operator and obtain its corresponding prefix expression; if not, the current symbol corresponds to a basic expression and execute it. Step S302.
对剩余的表达式符号流继续进行前缀运算符的判断和暂存,直至读入表达式符号流中所有的前缀运算符及其对应的前缀表达式,构建得到各前缀表达式对应的抽象语法树。Continue to judge and temporarily store the prefix operators in the remaining expression symbol stream until all the prefix operators and their corresponding prefix expressions in the expression symbol stream are read, and the abstract syntax tree corresponding to each prefix expression is constructed. .
步骤S302.判断基本表达式的当前符号是字面量还是标识符,若是字面量,则执行步骤S303;若是标识符,则执行步骤S304。Step S302. Determine whether the current symbol of the basic expression is a literal or an identifier. If it is a literal, perform step S303; if it is an identifier, perform step S304.
步骤S303.读入基本表达式的当前符号,构建字面量对应的抽象语法树,然后执行步骤S305。Step S303. Read the current symbol of the basic expression, construct an abstract syntax tree corresponding to the literal, and then execute step S305.
步骤S304.读入基本表达式的当前符号,构建标识符对应的抽象语法树,然后判断后续符号是否是结构体成员访问、数组成员访问和函数调用对应的运算符,若是,则缓存该运算符并对剩余表达式符号流继续执行步骤S302,利用标识符对应的抽象语法树与步骤S303得到的字面量对应的抽象语法树,构建结构体成员访问、数组成员访问和函数调用的抽象语法树,然后执行步骤S305;若不是,则直接执行步骤S305。Step S304. Read the current symbol of the basic expression, construct an abstract syntax tree corresponding to the identifier, and then determine whether the subsequent symbol is an operator corresponding to structure member access, array member access, and function call. If so, cache the operator. And continue to execute step S302 for the remaining expression symbol stream, using the abstract syntax tree corresponding to the identifier and the abstract syntax tree corresponding to the literal obtained in step S303 to construct an abstract syntax tree for structure member access, array member access and function calling, Then execute step S305; if not, execute step S305 directly.
步骤S305.判断当前符号是否是中缀运算符,若是,则利用算符优先分析算法,基于该中缀运算符对应的中缀表达式,构建得到中缀表达式对应的抽象语法树;若不是,则直接保存当前已构建出的抽象语法树。Step S305. Determine whether the current symbol is an infix operator. If so, use the operator priority analysis algorithm to construct an abstract syntax tree corresponding to the infix expression based on the infix expression corresponding to the infix operator; if not , then directly save the currently constructed abstract syntax tree.
步骤S306.对表达式符号流执行步骤S302~步骤S306,并结合步骤S301得到的前缀表达式对应的抽象语法树,得到表达式抽象语法树。Step S306: Execute steps S302 to S306 on the expression symbol stream, and combine it with the abstract syntax tree corresponding to the prefix expression obtained in step S301 to obtain an expression abstract syntax tree.
步骤S4可进一步细化为如下子步骤:Step S4 can be further refined into the following sub-steps:
步骤S401.基于步骤S102中数据结构记录的规则集元信息,判断表达式抽象语法树的当前节点类型,如果是标识符或字面量节点,则查询并更新当前节点类型后返回;如果是函数调用节点,则执行步骤S402-A;如果是成员访问操作,则执行步骤S402-B;如果是中缀运算节点,则执行步骤S402-C;Step S401. Based on the rule set meta-information recorded in the data structure in step S102, determine the current node type of the expression abstract syntax tree. If it is an identifier or literal node, query and update the current node type and return; if it is a function call If it is a node, perform step S402-A; if it is a member access operation, perform step S402-B; if it is an infix operation node, perform step S402-C;
步骤S402-A.对函数调用的每一个实参节点执行步骤S401,然后根据函数参数类型查找函数重载表,选择函数形参类型与调用的实参类型匹配的真实函数替换函数调用,更新当前节点的返回类型并返回;Step S402-A. Execute step S401 for each actual parameter node of the function call, then search the function overload table according to the function parameter type, select the real function that matches the function parameter type and the called actual parameter type to replace the function call, and update the current The return type of the node and returned;
步骤S402-B.对被访问的值对应的节点执行步骤S401,然后查找类型定义判断当前成员访问是否可行,若可行则将当前节点的返回类型更新为成员类型并返回;若不可行,则直接返回;Step S402-B. Execute step S401 on the node corresponding to the accessed value, and then search the type definition to determine whether the current member access is feasible. If it is feasible, update the return type of the current node to the member type and return; if not, directly return;
步骤S402-C.对参与中缀运算的左侧值和右侧值执行步骤S401,然后判断左侧值和右侧值的类型是否均为实数类型,若是则将当前节点的返回类型更新为实数类型并返回;若不是,则直接返回;Step S402-C. Execute step S401 on the left value and the right value participating in the infix operation, and then determine whether the types of the left value and the right value are both real number types. If so, update the return type of the current node to a real number. type and return; if not, return directly;
步骤S403.对表达式抽象语法树的所有节点执行步骤S401,得到校验后的表达式抽象语法树。Step S403. Execute step S401 on all nodes of the expression abstract syntax tree to obtain the verified expression abstract syntax tree.
步骤S5可进一步细化为如下子步骤:Step S5 can be further refined into the following sub-steps:
步骤S501.在校验后的表达式抽象语法树上的一个原子规则上新建一个条件分支节点,构建形如IF-THEN-ELSE的条件分支语句,使该原子规则的前件表达式作为条件分支语句的条件表达式,该原子规则的后件表达式作为条件分支语句的条件表达式,剩余原子规则对应的抽象语法树作为条件分支语句的假值分支;对一个子规则集中的每一个原子规则递归进行上述处理,得到由一系列条件分支语句和条件分支节点连接起来的子规则集的抽象语法树。Step S501. Create a new conditional branch node on an atomic rule on the verified expression abstract syntax tree, construct a conditional branch statement in the shape of IF-THEN-ELSE, and use the antecedent expression of the atomic rule as a conditional branch. The conditional expression of the statement, the consequent expression of the atomic rule is used as the conditional expression of the conditional branch statement, and the abstract syntax tree corresponding to the remaining atomic rules is used as the false value branch of the conditional branch statement; for each atomic rule in a sub-rule set Perform the above processing recursively to obtain an abstract syntax tree of a sub-rule set connected by a series of conditional branch statements and conditional branch nodes.
步骤S502.对每个子规则集执行步骤S501,得到各子规则集的抽象语法树。Step S502. Execute step S501 for each sub-rule set to obtain the abstract syntax tree of each sub-rule set.
步骤S503.合并各子规则集的抽象语法树,得到规则集的抽象语法树。Step S503. Merge the abstract syntax trees of each sub-rule set to obtain the abstract syntax tree of the rule set.
步骤S6可进一步细化为如下子步骤:Step S6 can be further refined into the following sub-steps:
步骤S601.构建用于记录已加载态势变量名称的集合,该集合初始为空;Step S601. Construct a set for recording the names of loaded situation variables. The set is initially empty;
步骤S602.遍历当前原子规则的前件表达式与后件表达式的抽象语法树节点,在用于记录已加载态势变量名称的集合中,查找已加载态势变量名称,并在前件表达式之前添加不包含于集合中的态势变量名称对应的态势变量读入函数的函数调用;将所有访问到的态势变量名称储存至集合中;Step S602. Traverse the abstract syntax tree nodes of the antecedent expression and the consequent expression of the current atomic rule, find the loaded situation variable name in the set used to record the loaded situation variable name, and search for the loaded situation variable name before the antecedent expression. Add function calls to the situation variable reading function corresponding to situation variable names that are not included in the collection; store all accessed situation variable names into the collection;
步骤S603.在规则集的抽象语法树中,遍历各子规则集的各原子规则,执行步骤S602,直至将各个抽象语法树节点访问的所有态势变量名称储存至集合中,得到用于生成代码的抽象语法树。Step S603. In the abstract syntax tree of the rule set, traverse each atomic rule of each sub-rule set, and execute step S602 until all situation variable names accessed by each abstract syntax tree node are stored in the set, and the information used to generate code is obtained. Abstract syntax tree.
步骤S7可进一步细化为如下子步骤:Step S7 can be further refined into the following sub-steps:
步骤S701.遍历用于代码生成的抽象语法树的节点,将用于代码生成的抽象语法树转换为对应的C/C++代码,将其录入到源代码文件,并生成对应的头文件;Step S701. Traverse the nodes of the abstract syntax tree used for code generation, convert the abstract syntax tree used for code generation into the corresponding C/C++ code, enter it into the source code file, and generate the corresponding header file;
步骤S702.整理平台接口模板,填充接口源码中与行为模型有关的操作,包括输入态势变量与中间状态变量的读入函数;Step S702. Organize the platform interface template and fill in the operations related to the behavioral model in the interface source code, including the read functions for input situation variables and intermediate state variables;
步骤S703.调用构建系统对步骤S701得到的源代码文件和头文件,与步骤S702整理好的接口模板进行构建,并调用编译器编译生成规则行为模型;其中,规则行为模型指可用于特定计算机生成兵力仿真平台的动态库或可执行文件。Step S703. Call the construction system to build the source code file and header file obtained in step S701 and the interface template compiled in step S702, and call the compiler to compile and generate a rule behavior model; where the rule behavior model refers to a rule behavior model that can be used for specific computer generation The dynamic library or executable file of the military simulation platform.
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。The above are only preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of changes or modifications within the technical scope disclosed in the present invention. All substitutions are within the scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310546534.3A CN116755704A (en) | 2023-05-16 | 2023-05-16 | Real-time code generation method for rule behavior model based on rule description files |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310546534.3A CN116755704A (en) | 2023-05-16 | 2023-05-16 | Real-time code generation method for rule behavior model based on rule description files |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116755704A true CN116755704A (en) | 2023-09-15 |
Family
ID=87950407
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310546534.3A Pending CN116755704A (en) | 2023-05-16 | 2023-05-16 | Real-time code generation method for rule behavior model based on rule description files |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116755704A (en) |
-
2023
- 2023-05-16 CN CN202310546534.3A patent/CN116755704A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110187885B (en) | Intermediate code generation method and device for quantum program compiling | |
CN111309757B (en) | SQL interpreter and optimization method of HBase | |
CN101894236B (en) | Software homology detection method and device based on abstract syntax tree and semantic matching | |
Carroll | Practical unification-based parsing of natural language | |
KR101224813B1 (en) | Relationship modeling | |
US7523125B2 (en) | Parsing system | |
US20140156282A1 (en) | Method and system for controlling target applications based upon a natural language command string | |
CN115757462B (en) | An Object-Oriented Database Dynamic Interface Generation Method and Operation Method | |
CN117873559A (en) | Code abstract generation method based on large language model and static analysis tool | |
CN108563561B (en) | A method and system for extracting program implicit constraints | |
KR102614967B1 (en) | Automation system and method for extracting intermediate representation based semantics of javascript | |
Angelov et al. | PGF: A portable run-time format for type-theoretical grammars | |
CN114816356A (en) | System and method for generating HTTP request code based on interface document | |
CN110309214A (en) | A kind of instruction executing method and its equipment, storage medium, server | |
Koskimies et al. | The design of a language processor generator | |
CN117193781B (en) | A method and device for constructing an abstract syntax tree for SIMSCRIPT language | |
CN116755704A (en) | Real-time code generation method for rule behavior model based on rule description files | |
CN118113264A (en) | A SQL code hint method based on keyword backtracking and token sorting | |
CN110716953A (en) | SQL statement automatic generation method, device, equipment and readable storage medium | |
KR20050065015A (en) | System and method for checking program plagiarism | |
CN107341021B (en) | A Software Network Representation, Storage and Retrieval Method for Large and Complex Software with Constrained Logic Attributes | |
CN112650680A (en) | Detection method and system for redundant variables and redundant method based on abstract syntax tree | |
CN115879868B (en) | Expert system and deep learning integrated intelligent contract security audit method | |
CN118916031B (en) | Multi-terminal code mapping translation method for Internet medical platform | |
CN114675831B (en) | Compiling system and method for programming language |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |