Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Clips, Can I use the Instance to completly replace the Fact? What‘s the meaning of Fact's existence?

Tags:

clips

In my opinion, The Instance can do everything that Fact can, What's the meaning of the Fact's existence? In other words, What is the difference between the Instance and the Fact? Is there a situation that only Fact can be used?

It bothers me a lot and I searched a lot but no answer to me, Can anyone help me? Thanks very much!

like image 258
NE555 Avatar asked Dec 27 '25 21:12

NE555


1 Answers

The original form for representing data in CLIPS was ordered facts. Version 4.3 introduced deftemplate facts. Version 5.0 introduced the CLIPS Object Oriented Language with support for instances. Pattern matching on instances was not supported until version 6.0 of CLIPS. So there was a seven year period in the early days of CLIPS where if you wanted to use rules, you had to use facts. Pattern matching on facts is a little bit faster than it is for instances, but otherwise there's nothing you can do with facts that you can't do with instances, while there's many things with instances that you can't do with facts.

like image 86
Gary Riley Avatar answered Dec 30 '25 23:12

Gary Riley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!