You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -111,26 +110,26 @@ npm i -g @ton-community/func-js
111
110
func-js -h
112
111
```
113
112
114
-
## Генерация мутантов
113
+
## Mutant generation
115
114
116
-
Смысл такой:
115
+
The basic model is:
117
116
118
-
-`mutate`генерирует мутантов
119
-
-для каждого мутанта для`tact` / `tolk` / `func` compile-check запускается автоматически через language handler
120
-
-если команда возвращает `0`, мутант считается`VALID`
121
-
-`--cmd`нужен только если хочется принудительно переопределить команду проверки
122
-
-`--cmd`имеет приоритет над встроенными TON handler-ами и подходит для нестандартного компилятора, обёртки или локального скрипта
123
-
-В regex-режиме многострочные блок-комментарии `/* ... */`, `{- ... -}` и пустые строки глобально пропускаются для всех языков
117
+
-`mutate`generates mutants
118
+
-for each mutant in`tact` / `tolk` / `func`, compile-check runs automatically through the language handler
119
+
-if the command returns `0`, the mutant is considered`VALID`
120
+
-`--cmd`is only needed if you want to force a custom validation command
121
+
-`--cmd`has priority over the built-in TON handlers and is useful for a custom compiler, wrapper, or local script
122
+
-in regex mode, multiline block comments `/* ... */`, `{- ... -}`, and empty lines are globally skipped for all languages
124
123
125
-
## Изменения ядра (mutator.py)
124
+
## Core changes (`mutator.py`)
126
125
127
-
-В regex-режиме мутатор пропускает пустые строки и блок-комментарии `/* ... */`и`{- ... -}`для всех языков, чтобы не мутировать комментарии и не раздувать шум.
128
-
-Для FunC добавлен быстрый фильтр в regex-режиме: если строка содержит `store_uint`или`store_int`и выражение с длинной суммой чисел (5+ числовых литералов), то числовые мутации из `universal.rules`вида `(\D)(\d+)(\D)`пропускаются. Это ускоряет генерацию и уменьшает пачку `INVALID`на выражениях длины битов. Фильтр включается только при наличии `func.rules`и не влияет на другие языки или`--comby`.
126
+
-In regex mode, the mutator skips empty lines and block comments `/* ... */`and`{- ... -}`for all languages, to avoid mutating comments and inflating noise.
127
+
-For FunC, a fast regex-mode filter was added: if a line contains `store_uint`or`store_int`and also contains a long numeric sum expression (5+ numeric literals), numeric mutations from `universal.rules`of the form `(\D)(\d+)(\D)`are skipped. This speeds up generation and reduces the number of `INVALID`mutants on bit-width expressions. The filter is enabled only when `func.rules`is active and does not affect other languages or`--comby`.
129
128
130
-
### Изменения генератора (genmutants.py)
129
+
### Generator changes (`genmutants.py`)
131
130
132
-
-При`--swap` строки для перестановки теперь исключают пустые строки и строки-комментарии (`//`, `;;`, `#`), а также строки внутри блок-комментариев`/* ... */`и`{- ... -}`. Это делает свапы более осмысленными и уменьшает число мусорных `INVALID`.
133
-
-Также `--swap`не переставляет одинаковые строки (включая случаи, когда совпадает содержимое после `strip()`), чтобы не генерировать бессмысленные мутанты вроде перестановки `}`с`}`.
131
+
-With`--swap`, lines considered for swapping now exclude empty lines, comment lines (`//`, `;;`, `#`), and lines inside block comments`/* ... */`and`{- ... -}`. This makes swaps more meaningful and reduces noisy `INVALID` mutants.
132
+
-`--swap`also avoids swapping identical lines, including cases where `strip()` produces the same content, so it does not generate pointless mutants such as swapping `}`with`}`.
134
133
135
134
### 2026-04-28 update: mutator/comby sync
136
135
@@ -142,69 +141,69 @@ func-js -h
142
141
-`universalmutator/mutator.py`: import of `Comby` is now lazy and happens only inside `mutants_comby()`. This removes the top-level hard dependency during module import, but does not replace the external `comby` binary requirement for actual `--comby` runs.
143
142
-`universalmutator/genmutants.py`: TON extensions `.tact`, `.fc`, `.func`, `.tolk` are mapped to Comby matcher `.generic` in `--comby` mode. Comby does not support TON-specific matcher names directly, so this avoids failures like `The matcher ".fc" is not supported`. Other languages keep their previous matcher behavior.
144
143
145
-
## Команды
144
+
## Commands
146
145
147
146
### `mutate`
148
147
149
-
Генерирует мутантов и кладёт их в`--mutantDir`. При необходимости можно добавить `--cmd`или`--noFastCheck`.
148
+
Generates mutants and writes them to`--mutantDir`. Add `--cmd`or`--noFastCheck` if needed.
Фильтрует список мутантов по правилам из конфигурации. Формат правил — строки вида `field: value`, доступны `orig`, `mutant`, `change`, `source`, `line` и их варианты с `!`или`_RE`.
192
+
Filters a mutant list using a configuration file. Rule format is `field: value`; supported fields include `orig`, `mutant`, `change`, `source`, `line`, and their `!`/`_RE` variants.
0 commit comments