class RuleModelVisitor {

    private void visitSingleFieldConstraint(SingleFieldConstraint sfc) {
        if (BaseSingleFieldConstraint.TYPE_PREDICATE == sfc.getConstraintValueType()){
            parseStringPattern(sfc.getValue());
            return;
        }

        InterpolationVariable var = new InterpolationVariable(sfc.getValue(),
                                                              sfc.getFieldType(),
                                                              (factPattern == null ? "" : factPattern.getFactType()),
                                                              sfc.getFieldName(),
                                                              sfc.getOperator());
        if (BaseSingleFieldConstraint.TYPE_TEMPLATE == sfc.getConstraintValueType() && !vars.containsKey(var)) {
            vars.put(var,
                     vars.size());
        }

        //Visit Connection constraints
        if (sfc.getConnectives() != null) {
            for (int i = 0; i < sfc.getConnectives().length; i++) {
                final ConnectiveConstraint cc = sfc.getConnectives()[i];
                InterpolationVariable ccVar = new InterpolationVariable(cc.getValue(),
                                                                        cc.getFieldType(),
                                                                        (factPattern == null ? "" : factPattern.getFactType()),
                                                                        cc.getFieldName());
                if (BaseSingleFieldConstraint.TYPE_TEMPLATE == cc.getConstraintValueType() && !vars.containsKey(ccVar)) {
                    vars.put(ccVar,
                             vars.size());
                }
            }
        }
    }

    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);

}