public List<String> getBoundVariablesInScope(final BaseSingleFieldConstraint con) {
        final List<String> result = new ArrayList<String>();
        for (int i = 0; i < this.lhs.length; i++) {
            IPattern pat = this.lhs[i];
            if (findBoundVariableNames(con,
                                       result,
                                       pat)) {
                return result;
            }
        }
        return result;
    }
public List < String > getBoundVariablesInScope ( final BaseSingleFieldConstraint con ) { final List < String > result = new ArrayList < String > ( ) ; for ( int i = 0 ; i < this . lhs . length ; i ++ ) { IPattern pat = this . lhs [ i ] ; if ( findBoundVariableNames ( con , result , pat ) ) { return result ; } } return result ; }
This uses a deceptively simple algorithm to determine what bound
variables are in scope for a given constraint (including connectives).
Does not take into account globals.