<commit_before>import logging
import operator

l = logging.getLogger('claripy.balancer')

class Balancer(object):
    '''
    The Balancer is an equation redistributor. The idea is to take an AST and
    rebalance it to, for example, isolate unknown terms on one side of an
    inequality.
    '''

    def __init__(self, helper, c):
        self._helper = helper
        self._truisms = [ c.ite_excavated ]
        self._processed_truisms = set()
        self.bounds = [ ]

        self.sat = True
        try:
            self._doit()
        except ClaripyBalancerUnsatError:
            self.bounds = [ ]
            self.sat = False
        except BackendError:
            l.warning("Backend error in balancer.", exc_info=True)

    @property
    def compat_ret(self):
        return (self.sat, self.replacements)

    def _replacements_iter(self):
        for o,b in self.bounds:
            yield (o, o.intersection(b))

    @property
    def replacements(self):<commit_msg>lower the verbosity on BackendErrors in balancer<commit_after>import logging
import operator

l = logging.getLogger('claripy.balancer')

class Balancer(object):
    '''
    The Balancer is an equation redistributor. The idea is to take an AST and
    rebalance it to, for example, isolate unknown terms on one side of an
    inequality.
    '''

    def __init__(self, helper, c):
        self._helper = helper
        self._truisms = [ c.ite_excavated ]
        self._processed_truisms = set()
        self.bounds = [ ]

        self.sat = True
        try:
            self._doit()
        except ClaripyBalancerUnsatError:
            self.bounds = [ ]
            self.sat = False
        except BackendError:
            l.debug("Backend error in balancer.", exc_info=True)

    @property
    def compat_ret(self):
        return (self.sat, self.replacements)

    def _replacements_iter(self):
        for o,b in self.bounds:
            yield (o, o.intersection(b))

    @property
    def replacements(self):
{'fraction_non_alphanumeric': 0.09013520280420631, 'fraction_numerical': 0.0, 'mean_word_length': 2.2277867528271407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '614105', 'n_tokens_mistral': 603, 'n_tokens_neox': 584, 'n_words': 167}