class RuleModelVisitor {

    public void visit(Object o) {
        if (o == null) {
            return;
        }
        if (o instanceof RuleModel) {
            visitRuleModel((RuleModel) o);
        } else if (o instanceof FactPattern) {
            visitFactPattern((FactPattern) o);
        } else if (o instanceof CompositeFieldConstraint) {
            visitCompositeFieldConstraint((CompositeFieldConstraint) o);
        } else if (o instanceof SingleFieldConstraintEBLeftSide) {
            visitSingleFieldConstraint((SingleFieldConstraintEBLeftSide) o);
        } else if (o instanceof SingleFieldConstraint) {
            visitSingleFieldConstraint((SingleFieldConstraint) o);
        } else if (o instanceof CompositeFactPattern) {
            visitCompositeFactPattern((CompositeFactPattern) o);
        } else if (o instanceof FreeFormLine) {
            visitFreeFormLine((FreeFormLine) o);
        } else if (o instanceof FromAccumulateCompositeFactPattern) {
            visitFromAccumulateCompositeFactPattern((FromAccumulateCompositeFactPattern) o);
        } else if (o instanceof FromCollectCompositeFactPattern) {
            visitFromCollectCompositeFactPattern((FromCollectCompositeFactPattern) o);
        } else if (o instanceof FromCompositeFactPattern) {
            visitFromCompositeFactPattern((FromCompositeFactPattern) o);
        } else if (o instanceof DSLSentence) {
            visitDSLSentence((DSLSentence) o);
        } else if (o instanceof ActionInsertFact) {
            visitActionFieldList((ActionInsertFact) o);
        } else if (o instanceof ActionUpdateField) {
            visitActionFieldList((ActionUpdateField) o);
        } else if (o instanceof ActionSetField) {
            visitActionFieldList((ActionSetField) o);
        } else if (o instanceof TemplateAware) {
            visitTemplateVariableAware((TemplateAware) o);
        }
    }

    public  RuleModelVisitor();
    public  RuleModelVisitor(Map<InterpolationVariable, Integer> vars);
    public  RuleModelVisitor(IPattern pattern,
                            Map<InterpolationVariable, Integer> vars);
    public  RuleModelVisitor(IAction action,
                            Map<InterpolationVariable, Integer> vars);
    public  RuleModelVisitor(IPattern[] lhs,
                            Map<InterpolationVariable, Integer> vars);
    public  RuleModelVisitor(IAction[] rhs,
                            Map<InterpolationVariable, Integer> vars);

}