Skip to content

Commit

Permalink
remove constant prob var
Browse files Browse the repository at this point in the history
  • Loading branch information
snuffysasa committed Jun 27, 2022
1 parent d4723d6 commit eadec51
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/randomizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
# first expression it's used in with this probability.
PROB_TEMP_ASSIGN_AT_FIRST_USE = 0.2

PROB_REVERSE_CHAIN_CASE = 0.5

# When creating a temporary for an expression, use the temporary for all equal
# expressions with this probability.
PROB_TEMP_REPLACE_ALL = 0.2
Expand Down Expand Up @@ -690,7 +688,7 @@ def visitor(expr: Expression) -> None:
# then decide whether to flip the order of assignments in the chain assignment statement
if place is None and not should_make_ptr:
stmt = find_assignment_stmt_by_rvalue(fn.body, expr)
if stmt and random_bool(random, PROB_REVERSE_CHAIN_CASE):
if stmt and random_bool(random, 0.5):
assert isinstance(stmt, ca.Assignment)
expr = stmt.lvalue
reverse_chain_case = True
Expand Down

0 comments on commit eadec51

Please sign in to comment.