sunrain
Programmer
- Feb 9, 2009
- 2
Hello,
I have a set of facts (a(c1), b(c2), ...) in my knowledge base that might not always be there. My set of rules 'assume' that all facts exist. If one of the facts does not exist (i.e. b(c2) is missing), when I run my program I get an error saying that I have an "Undefined procedure: b/1" which makes sense because I am using b which is undefined. When writing my rules, how can I check if specific facts (procedures) exist?
Thank you,
Mihai
I have a set of facts (a(c1), b(c2), ...) in my knowledge base that might not always be there. My set of rules 'assume' that all facts exist. If one of the facts does not exist (i.e. b(c2) is missing), when I run my program I get an error saying that I have an "Undefined procedure: b/1" which makes sense because I am using b which is undefined. When writing my rules, how can I check if specific facts (procedures) exist?
Thank you,
Mihai