Skip to content

Commit

Permalink
Remove union preprocessor (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
twizmwazin authored Sep 25, 2024
1 parent da04107 commit a0c6aa1
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions claripy/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ def _op(*args):
kwargs["uninitialized"] = None
if any(a.uninitialized is True for a in args if isinstance(a, claripy.ast.Base)):
kwargs["uninitialized"] = True
if name in preprocessors:
args, kwargs = preprocessors[name](*args, **kwargs)

return return_type(name, fixed_args, **kwargs)

Expand Down Expand Up @@ -109,30 +107,6 @@ def _reversed_op(*args):
return _reversed_op


#
# Extra processors
#

union_counter = itertools.count()


def preprocess_union(*args, **kwargs):
#
# When we union two values, we implicitly create a new symbolic, multi-valued
# variable, because a union is essentially an ITE with an unconstrained
# "choice" variable.
#

new_name = "union_%d" % next(union_counter)
kwargs["add_variables"] = frozenset((new_name,))
return args, kwargs


preprocessors = {
"union": preprocess_union,
# 'intersection': preprocess_intersect
}

#
# Length checkers
#
Expand Down

0 comments on commit a0c6aa1

Please sign in to comment.