public class ShapeToRuleTransformer implements ModelTransformer {
@Override
public Model transform(Model in) {
Model out = new Model();
final RuleFactory ruleFactory = new RuleFactory(new ModelInfo(in.getLines()).getShapeParameters());
for(Statement line : in.getLines()){
out.addStatement(line);
if (line instanceof GeneratorStatement)
out.addStatements(ruleFactory.generateRules((((GeneratorStatement)line).getGenerator())));