Back in a different geological epoch I built a lot of expert systems. I'm a little rusty, but I think I can say that the system I used the most (TIRS), was a "frame-based" kind of system. Maybe not truly frame-based, but at least kind of frame-based. By "frame-based" I mean a system where you could create class-like templates (frames) and then instantiate them. Then, you could write "rules" that could take the general form:
if there exists an instance of frame X and
if there exists an instance of frame Y and
if there exists an instance of frame Z such that
X.a == Y.e and
X.b == Z.m and
Y.f == Z.n
then do stuff...
Sometimes it felt almost like weird, in-memory SQL queries.
Anyway, I have a
Java app. where I need to create a lot of rules (maybe 25 to 50 rules?), like the one I showed above. A really horrible way to do it is to create nested loops (foreach X, Y, Z). I've written a few of those "rules" and they kind of make me throw up in my mouth a little
In my case, I think it's okay to hard code the order in which these rules will "fire" (be executed).
So the question is, is there a cleaner, fairly lightweight way to implement rules like this as a part of a larger Java app?
I remember looking at Jess a long time ago and feeling like it was very capable, but also probably not very lightweight from either a performance or "brain investment" perspective. Maybe I'm wrong about that?