摘要
传统的基于规则的工具,如OPS5,CLIPS等都是自封闭的,很难集成在用C 等面向对象语言开发的实际系统中.该文在借鉴ILOGRules和CLIPS等工具的基础上提出了一种嵌入在C 语言中的规则语言,主要研究了把该规则语言翻译到生成Rete网络推理机的C 源文件的预编译器的实现方法.该规则语言对ILOGRules做了两点扩充,一是允许直接把C 语言嵌入在规则的条件部分和动作部分用来表达谓词测试和动作;二是增加了AND和OR两种模式成组关系,这样增强了规则表达实际问题的能力和规则与C 语言的互操作性.
Traditional rulebased tools, such as OPS5, CLIPS, etc. are standalone, so it is difficult to integrate them into an actual system coded with the C language. Based on ILOG Rules and CLIPS, a rule language embedded into the C is designed and a precompiler which translates this rule language into the C source is implemented in this paper. The designed rule language enhances the ability of cooperation between rule and C language in two aspects: one is that the rule can be embedded directly into LHS and RHS, and the other is to allow AND and OR pattern grouping in LHS.
出处
《西安电子科技大学学报》
EI
CAS
CSCD
北大核心
2003年第1期97-102,共6页
Journal of Xidian University
基金
国家部委预研基金资助项目(413150501)