Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a fuzzer #5

Open
pimlu opened this issue Jul 21, 2020 · 1 comment
Open

Write a fuzzer #5

pimlu opened this issue Jul 21, 2020 · 1 comment

Comments

@pimlu
Copy link
Owner

pimlu commented Jul 21, 2020

Basic idea:

Pick a fixed number of prime registers, say 1 to 10.

Randomly generate exponents in the numerators/denominators.

Run it for up to 100 steps w/o cycle detection. Run it for 1..10-length cycle detection and for each, verify the steps listed in the cycle detected result match the manual run. If it cycle detects an infinite loop, verify it by checking the logic registers one cycle forward. Last part is important because the self interpeters both failed by way of infinite loop.

Rinse and repeat. Run this overnight or whatever. Make sure to simulate a failure and check that it actually reports what input failed correctly so I don't waste my CPU.

@pimlu
Copy link
Owner Author

pimlu commented Jul 21, 2020

Also, needs randomly generated starting exponents, somewhere in the middle of the average denominator. I will want to log what kind of outcomes happened (terminated after 21 steps, 2-cycle after 15 steps, etc). Also ideally which fractions were even used, because I'm worried this kind of naive random generation won't generate the kind of control structures that would trigger bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant