Java program that parses a Datalog program