FPLParser parser = new FPLParser(string, null, null);
Predicate pred = parser.expression();
Assert.assertTrue("Parsed predicate should be a ImpliesPredicate, but is " + pred.getClass().getCanonicalName(), pred instanceof OrPredicate);
OrPredicate val = (OrPredicate)pred;
Assert.assertTrue("Left side is a implies pred", val.getLeft() instanceof ImpliesPredicate);
Assert.assertTrue("Right side is a bool value", val.getRight() instanceof BooleanValue);
FreeVars vars = val.getFreeVariables();
Assert.assertEquals("Should only contain three free variables", 3, vars.size());
vars = val.getLeft().getFreeVariables();
Assert.assertEquals("Should only contain two free variables", 2, vars.size());
Assert.assertEquals("c should have a boolean type", "boolean", vars.getType(new SpecVar("c")));
Assert.assertEquals("b should have a boolean type", "boolean", vars.getType(new SpecVar("b")));
vars = val.getRight().getFreeVariables();
Assert.assertEquals("Should only contain 1 free variables", 1, vars.size());
Assert.assertEquals("a should have a boolean type", "boolean", vars.getType(new SpecVar("a")));
}