public static LogicalConnector parseLogicalConnector(String s) throws ThinklabValidationException {
 
        LogicalConnector value = null;
        
        s = s.trim().toLowerCase();
        
        // TODO support formal notation quantifiers too
        if (s.equals("and") || s.equals("intersection"))
            value = INTERSECTION;
        else if (s.equals("or") || s.equals("union"))
            value = UNION;
        else if (s.equals("not") || s.equals("exclusion"))
            value = EXCLUSION;
        else if (s.equals("xor") || s.equals("disjoint-union"))
            value = DISJOINT_UNION;
        else 
           throw new ThinklabValidationException(s + " is not a valid logical connector");
        
        return value;
    }