Monthly Archives: May 2013

OPP moving to MA

We are currently closing up shop in VT and moving to MA.  Updates should start happening again with more development fun.  The rule compiler has gone through a major redesign, and I think the new design will be more robust and will actually be completed more quickly.

I got most of the way through the original munging of the rules, and found that I needed to start optimizations.  The code that I was writing would use brute force to compute complex boolean statements.  Example:  A && B && C.  If A is false, you immediately know the result is going to be false.  The code I was writing ended up evaluating the whole statement even though it was not necessary.  Now I could have started writing optimizations, but it seemed like a path of diminishing returns.  There are people who have spent years working on C compilers and why not just leverage their work.

If I take the rules, and then convert it to actual C code, I can then run it through a standard C compiler which will do a much better job at optimizing the code than I can.  I can also do all the same stuff with predefined functions so it will be easier to write the ruleset.

Upside is the it will run much more quickly after it is compiled, and I will need to spend much less time debugging corner cases in the code.  The downside is that it will take a longer period of time when a new ruleset is first installed on a machine.  Of course in the end product, that will happen very infrequently.  It only really matters during development.