Feeding Baby Penguins.

May 21

Finishing up MPS II

Today I added the last of the missing functionality in MPS. With the last commit I’ve got 11 functions in the public API. They are (in alphabetical order): agenda, assert-facts, clear, deffacts, defrule, facts, halt, modify-fact, reset, retract-facts and run. Some of these could have been left out and some should probably work differently from how I’ve implemented them now but that’s all details.

All in all, I’m very pleased with the result. The code base is smaller (roughly 500 LOC, almost half the size of MPS I) and a lot clearer and easier to read and understand. I’m particularly pleased with a few of the public functions. Here’s how the agenda function turned out:

If you know your way around production systems you’ll hopefully agree with me that there’s probably not a simpler description of the agenda functionality (using the conflict-resolution-strategy depth).

The next couple of weeks I’ll try to weed out as many bugs as I can by running a bunch of benchmarks (mostly Ms Manners) and I will hopefully come up with a way to add meta data (for example salience which I’ve left out for now) to rules.


Page 1 of 1