一种可动态配置的代码兼容性检测方法
By combining a parser and a rule engine, and dynamically configuring source code detection methods, the problems of inaccurate matching and complex configuration in source code adaptation are solved, achieving efficient and automated compatibility detection.
CN117519785BActive Publication Date: 2026-07-17四川启睿克科技有限公司
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 四川启睿克科技有限公司
- Filing Date
- 2023-10-25
- Publication Date
- 2026-07-17
Smart Images

Figure CN117519785B_ABST
Abstract
本发明公开了一种可动态配置的代码兼容性检测方法,基于通用的规则引擎配置文本匹配规则,将规则转换成语法分析器配置项追加到词法和语法配置文件中,通过语法分析器工具生成开发语言的类与方法,动态热加载到虚拟处理器进行调用并获得各项结果,再由规则引擎汇总生成结论。本发明通过语法分析器首先对源代码的关键信息进行了精准提取和格式化操作,消除了因不同作者编写代码时的个人编码风格迥异导致检测识别困难的问题,提升了检测匹配精度;利用规则引擎的可视化配置特性降低了兼容性检测规则的配置和维护难度,借助规则的动态配置间接实现了兼容性条件的灵活变更。
Need to check novelty before this filing date? Find Prior Art