@staticmethod<EOL><INDENT>def _split_constraints(constraints, concrete=True):<DEDENT>
splitted = [ ]<EOL>for i in constraints:<EOL><INDENT>splitted.extend(i.split(['<STR_LIT>']))<EOL><DEDENT>l.debug("<STR_LIT>", len(splitted))<EOL>concrete_constraints = [ ]<EOL>variable_connections = { }<EOL>constraint_connections = { }<EOL>for n,s in enumerate(splitted):<EOL><INDENT>l.debug("<STR_LIT>", len(s.variables))<EOL>connected_variables = set(s.variables)<EOL>connected_constraints = { n }<EOL>if len(connected_variables) == <NUM_LIT:0>:<EOL><INDENT>concrete_constraints.append(s)<EOL><DEDENT>for v in s.variables:<EOL><INDENT>if v in variable_connections:<EOL><INDENT>connected_variables |= variable_connections[v]<EOL><DEDENT>if v in constraint_connections:<EOL><INDENT>connected_constraints |= constraint_connections[v]<EOL><DEDENT><DEDENT>for v in connected_variables:<EOL><INDENT>variable_connections[v] = connected_variables<EOL>constraint_connections[v] = connected_constraints<EOL><DEDENT><DEDENT>unique_constraint_sets = set()<EOL>for v in variable_connections:<EOL><INDENT>unique_constraint_sets.add((frozenset(variable_connections[v]), frozenset(constraint_connections[v])))<EOL><DEDENT>results = [ ]<EOL>for v,c_indexes in unique_constraint_sets:<EOL><INDENT>results.append((set(v), [ splitted[c] for c in c_indexes ]))<EOL><DEDENT>if concrete and len(concrete_constraints) > <NUM_LIT:0>:<EOL><INDENT>results.append(({ '<STR_LIT>' }, concrete_constraints))<EOL><DEDENT>return results<EOL>
Returns independent constraints, split from this Frontend's `constraints`.