/** * Validation for the two imperfection wrappers — `missing="p"` and `anomaly="p"`. * * Both probabilities were parsed only where they are USED, deep inside the * sequence builder, so `tdcv2 check` called a config valid and the run then * stopped on `anomaly="10x"`. A check that passes what the very next command * refuses is worse than no check: it teaches the reader to distrust it. The * parse lives here now, and the generator keeps its own as a backstop for * callers who build a gen through the library API without validating first. * * The second check is about a request that would be honoured and still do * nothing. An anomaly is a numeric perturbation — the selected value is * multiplied by `anomaly_factor` — so a `value=` list with no number anywhere in * it has nothing to perturb, and ten rows come back ordinary with no sign that * 30% of them were supposed to be outliers. Only a `type="text"` list is judged, * because it is the only source whose whole candidate set is written in the * config: a file, a pack address or a regex may well produce numbers, and * guessing at them would refuse configs that work. */ import { type Diagnostic } from '../errors/index.js'; import type { OpenCloseElementContext, SelfClosingElementContext } from '../generated/TDCParser.js'; export declare function checkGenImperfections(gen: OpenCloseElementContext | SelfClosingElementContext, diagnostics: Diagnostic[]): void; /** * `anomaly_flag="NAME"` — the ground-truth companion column naming which rows * were turned into outliers. It mints a real sequence, so the name is recorded * as declared and `${{NAME}}` resolves like any other. * * Three ways to get it wrong, and the third is the one that used to be silent. * Inside a `` the attribute was accepted and did nothing at all: a case * body is a CONCATENATION of parts, so a flag written on one part describes * that part rather than the row's value, and the engine has no honest column to * mint. `` asks the same question where it has an answer. */ export declare function checkAnomalyFlag(gen: OpenCloseElementContext | SelfClosingElementContext, diagnostics: Diagnostic[], declaredSequences: string[], inCase: boolean, inJoinedBody?: boolean): void; /** * `if=` on a `` inside a `` — accepted by the grammar, read by nothing. * * A `` body is several parts JOINED into one value, so a condition on one * part has no answer to give: if it were false, the part would have to become * something, and there is no honest candidate. The branch already has its own * condition — `` — which is the question the shape does raise. * * It used to be accepted and ignored, so `` inside a case put * its value on EVERY row, including the ones the condition excluded, from a * config `check` had called valid. The same reasoning as TDC246 beside it: a * flag on one part does not describe the row, and neither does a condition. */ export declare function checkGenIfInCase(gen: OpenCloseElementContext | SelfClosingElementContext, diagnostics: Diagnostic[], inCase: boolean): void; //# sourceMappingURL=imperfections.d.ts.map