I am trying to implement some AI planning algorithms in C, but got stuck with the basic concept :)
Before jumping to the main problem, I tried implementing some small framework that would support propositional logic:
FORMULA f = PROPOSITION(a + 3 > 0);
FORMULA g = PROPOSITION(is_smaller_than(b, c));
f = AND(NOT(f), g);
Now, the problem is that I would like not to evaluate expressions like 'a + 3 > 0' at the moment of defining the formula, but in some later phase:
bool res = EVALUATE(f);
I guess closures would have been handy in this case, but unfortunately, I also like to stick to C99.
Any idea?
How about extending this to predicate logic?
The final goal (ideally) would be to build an AI planning library, which can be directly plugged-in to the application, and not to receive the problem as STRIPS program strings.
Thanks