public void constructKnowIt(FormulaNode f, KnowIt self) {
// if the FormulaNode is a node
if (f.getType() == 0) {
KnowIt left = new KnowIt("left", "boolean");
KnowIt right = new KnowIt("right", "boolean");
self.addParameter(left);
self.addParameter(right);
self.bind(new DoIt(f.getOperation()));
constructKnowIt(f.getLeftNode(), left);
constructKnowIt(f.getRightNode(), right);
// otherwise it is a variable
} else {
KnowIt bool = new KnowIt(f.getVariableName(), "boolean");
bool.bind(createTrue());
self.bind(bool);
}
}