aboutsummaryrefslogtreecommitdiff
path: root/lib/std/BitStack.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-11-03 19:50:49 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-11-03 20:05:32 -0700
commit13964796561a5e6ca16c76020bc3371858decb31 (patch)
tree181663792c456e56d0a5975eee5ac1eff0a7355a /lib/std/BitStack.zig
parentdff13e088b4da3fab50d72a8967b0d7cffeb9d7d (diff)
downloadzig-13964796561a5e6ca16c76020bc3371858decb31.tar.gz
zig-13964796561a5e6ca16c76020bc3371858decb31.zip
zig reduce: redesign
Now it works like this: 1. Walk the AST of the source file looking for independent reductions and collecting them all into an array list. 2. Randomize the list of transformations. A future enhancement will add priority weights to the sorting but for now they are completely shuffled. 3. Apply a subset consisting of 1/2 of the transformations and check for interestingness. 4. If not interesting, half the subset size again and check again. 5. Repeat until the subset size is 1, then march the transformation index forward by 1 with each non-interesting attempt. At any point if a subset of transformations succeeds in producing an interesting result, restart the whole process, reparsing the AST and re-generating the list of all possible transformations and shuffling it again. As for std.zig.render, the fixups operate based on AST Node Index rather than Nth index of the function occurence. This allows precise control over how to mutate the input.
Diffstat (limited to 'lib/std/BitStack.zig')
0 files changed, 0 insertions, 0 deletions