Simple problem statement:
I have some number of boolean variables and 3 boolean connectives: AND, OR, and NOT. The variables and connectives will be joined to form a boolean logic tree and we are interested in knowing the final result at the root based on some configuration of values for the leaves (the boolean variables). Here's the hard part: I want to make a program in C++ such that someone else can easily configure the tree. Bonus: It would be nice if I could break the tree up into smaller trees so that the intermediate evaluation results can be obtained as well. So instead of one big tree, maybe I would like a forest of trees where the root of one tree could be the leaf of another.
More detail / background if needed / interested:
I need to program a tester for binning. The test program is written in C++ and during testing, several boolean variables (counters) are populated with pass / fail based on testing results. Ultimately, a bin between 0 and 100 is assigned which best summarizes (as good as a single number can) the results of the test. The final bin is determined based on the counters set therefore, some counters are more important than others.
Basically, I want to know the best way to implement boolean logic trees. The leaves of the tree would be the counters and the branches or I guess places where the branches join the tree would be the boolean logic connectives (and, or, not, etc.). So does anyone have any idea on the best way to do this? Goal is to make it configurable. If the counters and boolean conditions always stayed the same, I would just write one very long if-condition. But the counters and conditions will change often enough that I want the boolean logic tree to be easily setup. Since others will be doing the setup, I would also like something that is easy to explain to others how to use. Any ideas / advice?