I am currently trying to implement OWL2 RL via Rete algorithm. I have run into the following issue: How to imple开发者_JS百科ment lists needed for example in this rule: eq-diff2 (W3C reccomendation)?
Thanks.
I have developed this solution.
- Before inference construct the lists in memory. It is simple, because the elements can be easily identified.
- Construct RETE nodes for first m rules, which don't need "loop" construct
Put an action in the last node:
- Add new Rete (alpha+beta) nodes for the corresponding list (you will always know which, because it's one of the "static" rules)
- Put corresponding WMEs into newly created alpha memories
- Activate Beta nodes
It is probably possible to remove the whole "dynamic" branch after the final action is performed.
精彩评论