Forgy's RETE is a self-modifying data structure.
How is this handled in Clojure?
New feature: added Java interface. Eclipse project example.
New feature: added Java interface. Eclipse project example.
(defn reset []"Reset: clear and initialize all memories"(def =AMEM= (object-array @ACNT))(def =BMEM= (object-array =BCNT=))(def =FMEM= (create-fmem =TEMPL=))(def =FMMB= (create-fmem =TEMPL=))(def =FIDS= (HashMap.))(def CFSET (atom nil))(def FCNT (atom 0)))It implies that you can only have one set of rules/engine in any usage of the library. Even if you plan to use mutable data - this seems to create additional restrictions. Why not put all of these into a map and pass that around as the ruleset/engine state?
New feature: added Java interface. Eclipse project example.
I avoided Miss Manners simply because it doesn't represent the usage patterns I have or expect, so I just have been profiling against the data I have for my use case.
Of course, Ms Manners may be a a better reflection of your needs, in which case it could be a good benchmark. Micro-benchmarking is full of pitfalls, so your mileage may vary.
-Ryan
New feature: added Java interface. Eclipse project example.