How to use the smt.boolean.BinaryOperation function in smt

To help you get started, we’ve selected a few smt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github c01db33f / concolica / utils.py View on Github external
while len(values) < count:
        if not state.solver.check(constraint):
            break
        
        m = state.solver.model(constraint)
        if value.name not in m:
            # solver doesn't know anything about our value yet...
            constraint = value != 0xbeefcafe
            continue
        
        model_value = m[value.name]
        values.add(model_value)
        
        if constraint is not None:
            constraint = bl.BinaryOperation(
                constraint,
                bl.BinaryOperator.And,
                value != model_value)
        else:
            constraint = value != model_value

    #print list(map(lambda x:hex(x.value), values))

    return list(values)