Commit 133e31b
feat(suggest): implement echidna suggest CLI verb — mechanical tactic-variant finder
Closes §4.1+§4.3 from ECHIDNA-NOTES-2026-04-27.md. New `echidna suggest
<file>:<lemma> --prover <P>` verb extracts a named lemma, identifies tactic
sites, looks up alternatives in data/synonyms/<prover>.toml, re-runs the
prover on each single-site substitution, and prints a ranked Markdown table.
Module layout:
src/rust/suggest/
mod.rs — SuggestConfig, run() entry point, parse_target, detect_prover
extractor.rs — Probe + TacticSite; per-prover line-based extractors for
Isabelle/HOL, Coq, Lean4, Idris2, Agda
synonyms.rs — SynonymTable + SynonymEntry (TOML deserialisation, by_name index)
variant.rs — Variant generation (single-site substitutions, Levenshtein ranking)
tester.rs — VariantOutcome; concurrent JoinSet-based variant testing
report.rs — Markdown table printer (closes > fails > timeout > syntax; edit asc)
26 new unit tests across 5 files; lib test count 972 → 998. All 998 pass.
Does NOT call ProverBackend::suggest_tactics (that is the §4.4 GNN layer).
Acceptance criteria covered: parse_target, detect_prover, synonym alternatives,
word-boundary substitution, Levenshtein, dry-run, empty-result paths.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 36d4c09 commit 133e31b
8 files changed
Lines changed: 1482 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
177 | 208 | | |
178 | 209 | | |
179 | 210 | | |
| |||
254 | 285 | | |
255 | 286 | | |
256 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
257 | 309 | | |
258 | 310 | | |
259 | 311 | | |
| |||
0 commit comments