Add TON language support: Tact, FunC, and Tolk#52
Add TON language support: Tact, FunC, and Tolk#52mysteryon88 wants to merge 53 commits intoagroce:masterfrom
Conversation
…le validity checks. [new] Added Makefile and updated README (sorry for Russian in it but I'll work on it later) [fix] Fixed genmutants.py and mutator.py for work with up-to-date libraries.
Fixes and improvements
…s, FunC rules and tests
- skip universal numeric literal mutations for dense sums in store_uint/store_int (func-only, regex mode) - add inline/inline_ref removal to static and comby rules - update FunC rule tests and mutation table; document core changes in FORK
- skip swaps for identical lines (including same content after strip)
Improve static Tact mutation rules
- split shared TON mutations into ton_common and keep language-specific rules focused - narrow unsafe CR/comment-replacement rules for FunC, Tolk, and Tact - reduce invalid mutants by guarding FunC special operators and Tolk call-site swaps - sync static and Comby rule layers with current TON ruleset behavior
|
Hi! I’d appreciate your review and feedback. |
|
@mysteryon88 will take a look! it'll take a bit, since I'm finishing up grading for semester and other things, but I'll put this a bit ahead of student submits. one thing to note that you might want to look at yourself, and I'll try to handle this week so you can take advantage, is that I'm finally dumping the terrible hand parsing of command line arguments and using a sane argparse approach, assuming a student PR for this works (I have a few candidates). |
|
And thanks very much! At a look, lots of little cleanups, including I think I saw in analyze.py some fixes I'd applied elsewhere and never done there! The problem with having a professor as the "code guy" is that my actual employer has zero interest in my doing this stuff well! |
|
@agroce |
Summary
I have known this tool for a long time and wanted to make a small but useful contribution to its development.
This PR adds mutation testing support for three TON languages:
Tact,FunC, andTolk. I tried to keep changes to the existing codebase as limited as possible and stay close to the current architecture, but along the way I also made a few targeted improvements in the core and surrounding infrastructure to make the integration more stable and practical.What Changed
.tact,.fc/.func, and.tolkfiles so the new languages can be detected by extension and flow through the existing mutation pipelinegenmutants.py,mutator.py, and a few related parts: this includes proper TON rule set / matcher selection, less noise in some swap and regex cases, and more robust execution and temp-file handling\) and Unix-style (/) paths, which makes downstream commands such asshow_mutantsand related flows behave consistently on both platformsCI/CDupdate so the new scenarios are better covered by automated checksWhy
Next Steps
Tolkis currently evolving quite actively, so it is likely that new mutation rules for it will appear over timeValidation
WindowsandLinuxTact,FunC, andTolk