News for hackers. Stuff that matters.
Re:Automated Test-Case Reduction by DRMacIver on Tuesday July 16, 2024 @03:21PM (#40979441)
Perses isn't language agnostic, it just knows the syntax of a lot of languages because there are antlr grammars for most commonly used languages.

Really there's no such thing as a language-agnostic test-case reducer. shrink ray is much closer than most, but all this means is that it's got some heuristics that work well for a wide variety of common languages (e.g. the bracket balancing thing). It's also got a bunch of language-specific passes.

This is sortof inherent to the problem, because in order to get good results and good performance, a test-case reducer has to have a strong idea of what sort of transformations are likely to work, which in turn means it has to have a strong idea of what sort of languages it's likely to be run on.

Re:Automated Test-Case Reduction by pdimitar on Tuesday July 16, 2024 @08:23PM (#40981517)
I am just shooting in the dark here so excuse me if my comment is too ignorant: have you considered rolling your own reducer and use TreeSitter grammars for it?
Re:Automated Test-Case Reduction by DRMacIver on Wednesday July 17, 2024 @08:02AM (#40984921)
Well, I do have my own reducer (shrinkray is mine), but I actually hadn't considered using TreeSitter grammars for it. That's a good idea, thanks!