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

Random seed initialisation not working #170

Closed
bendrissou opened this issue Nov 13, 2023 · 1 comment · Fixed by #176
Closed

Random seed initialisation not working #170

bendrissou opened this issue Nov 13, 2023 · 1 comment · Fixed by #176

Comments

@bendrissou
Copy link

When mutation and recombination modes are enabled, grammarinator-generate doesn't generate the same output consistently, despite setting --random-seed to a fixed number.

Here is the example command I am using:

grammarinator-generate JSONGenerator.JSONGenerator -r json -o tests/input.in -d 60 -n 1 --random-seed 4 --sys-path . -j=1 --population ../seeds/grts --no-generate

I used a JSON grammar to build JSONGenerator.

renatahodovan added a commit that referenced this issue Nov 15, 2023
By fixing the ordering of nodes in annotate and node filtering,
seeded test generation became deterministic in case of mutation
and recombination, too.

Fixes #170.
akosthekiss pushed a commit that referenced this issue Nov 15, 2023
…#176)

By fixing the ordering of nodes in annotate and node filtering,
seeded test generation became deterministic in case of mutation
and recombination, too.

Fixes #170.
@renatahodovan
Copy link
Owner

@bendrissou Thanks for the report. The issue is solved on the latest master, but you need to regenerate your existing corpus to have the expected behaviour. Please check it and tell me if it's working for you.

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

Successfully merging a pull request may close this issue.

2 participants