public void typeCheckUsingDotFile(
String file,
boolean optimize) throws PlanValidationException,
OptimizerException {
DotGraphReader reader = new DotGraphReader() ;
DotGraph graph = reader.loadFromFile(file) ;
if (!graph.attributes.containsKey("pigScript")) {
throw new AssertionError("pigScript attribute doesn't exist"
+ " in Dot file") ;
}