Skip to content

Conversation

saem
Copy link
Collaborator

@saem saem commented Oct 19, 2023

Summary

dust is an automatic test case minimizer written by @disruptek

  • what changed and how?
  • why are we changing it?

Details

  • info that couldn't fit into the summary
  • relevant details; tricky parts
  • anything else

Notes for Reviewers

  • clean-up commit message
  • figure out some minor testing, at least try it
  • audit dust code to use the latest in nimskull compiler
  • break out discardCheck fix
  • removing warnings and hints

Copy link
Collaborator

@zerbina zerbina left a comment

Choose a reason for hiding this comment

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

I did a first pass and left some minor style suggestions.

# yield the next available permutation (once)
result = pop(remains)
assert result.kind == nkStmtList
c.ignore = true
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not entirely sure, but since the process procedure is called for every fragment, wouldn't this mean that everything beyond and including the first declarative statement would be thrown away?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, seeing as this code seems to be unused, it looks to be an incomplete implementation.

@saem saem marked this pull request as draft October 20, 2023 19:39
@saem saem force-pushed the saem-tool-dust-port branch from 2a5cb71 to 79b0995 Compare October 31, 2023 20:14
saem added 9 commits January 18, 2024 13:12
the problem is that right now we generate more and more errors over
time, so the minimization process diverges, rather than converging.
right now there is a bug in `semcall.semResolvedCall` where a `tyError`
from a faux match doesn't have an error and is being wrapped

I'm guessing this will require removing a bunch of unwrapping logic to
fix, but not quite sure.
Wrapping nodes is no longer necesssary as they're reported immediately.
This was resulting in attempting to wrap nodes that no longer contain
errors but resulted in them.
Comment on lines +162 to +163
#excludeAllNotes(result, hintConf)
#excludeAllNotes(result, hintLineTooLong)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Re-add if possible

@saem
Copy link
Collaborator Author

saem commented Oct 13, 2025

Dust now works and successfully reduces the broken code in mminimizeme.nim, it's a bit slow, but that's probably fixable as sem gets faster (removal of unnecessary wrapping etc).

Another thing that will likely help a fair bit is a breadth first search and early elimination of the search space, but I'm not sure how to implement that (besides the breadth first) just yet.

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.

3 participants