Make sure that operators do not generate constants
Constant propagation does not resolve things like (x[0] != x[0]) as False, which then prevents the evaluation from detecting that the program is not actually looking at x. By removing any operator that may map a function of x to a constant, we make sure that a program that has "x" in its expression actually has an x-dependent output. NOTE: This commit does not address a corner case, of exp(large-number) being a constant (exp(10)). Maybe some programs may learn to use exp and then a division by a constant to fabricate a constant even though "x" appears in their string representation
Loading
Please register or sign in to comment