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

add support for fuzzing #180

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

nikomatsakis
Copy link
Contributor

This is pretty crude. We generate garbage and we don't even run tests because it's not really good enough to be useful. But I figured the basic setup makes sense and we can adapt as we go. I'm interested in shifting gears to focus on stable-mir at the moment.

@nikomatsakis nikomatsakis force-pushed the fuzz-away branch 3 times, most recently from 12bf122 to 1c2b0a3 Compare July 4, 2024 02:32
Still more work to do before we can productively use it.
For example we always generate empty structs with no fields right now.
But the setup seems correct.
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gotten slowly more unsure about that while going through this PR. If you have a homogeneous collection, their cardinality is cardinality_per_item^num_items, is it not 🤔

a bunch of nits, but the structure looks quite good, I like it. Especially the hackmd doc was very nice to read 😊

crates/formality-core/src/binder.rs Show resolved Hide resolved
crates/formality-core/src/binder/fuzz.rs Show resolved Hide resolved
Comment on lines +96 to +98
/// Lookup the value associated with the given value of type `K`.
/// If no map has been set for this (K,V) type, or if the key is not
/// found in the map that was set, returns `None`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

misplaced comment

crates/formality-core/src/fuzz.rs Outdated Show resolved Hide resolved
Comment on lines +254 to +255
/// Returns `None` if the recursion depth is exceeded.
/// Otherwise, returns a `Some(g)` with a guard that should be dropped when you have finished.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

outdated comment

crates/formality-macros/src/fuzz.rs Outdated Show resolved Hide resolved
crates/formality-rust/src/trait_binder.rs Outdated Show resolved Hide resolved
crates/formality-types/src/fuzz.rs Outdated Show resolved Hide resolved
crates/formality-rust/src/fuzz.rs Outdated Show resolved Hide resolved
crates/formality-rust/src/fuzz.rs Outdated Show resolved Hide resolved
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 this pull request may close these issues.

2 participants