Expand description
Deterministic test-case generation (A-03, issue #26).
Ports ac-test’s Level-1 generation semantics (spike #6 §2.3–§2.5) onto the domain model: integer scalars and one-dimensional integer arrays, boundary values plus fixed-seed pseudo-random cases, and conservative skipping whenever valid input cannot be proven.
[spec] parses the input-format block and constraint lines into a
GenSpec; prng holds the xorshift32 generator; this module
drives the five generation modes.
Modules§
- prng
- xorshift32 pseudo-random generator (spike #6 §2.5).
Structs§
- GenOutcome
- Result of
Generator::generate. - GenSpec
- The merged generation spec: input format plus constraint bounds.
- Generated
Case - One generated case: deterministic input text plus its provenance.
- Generator
- Runs a parsed
GenSpecthrough the five modes. - Input
Format - Parsed input-format block.
- Skipped
Case - A mode that could not produce a case (e.g. array length cap).
- VarBounds
- Lower/upper bound expressions for one variable. Multiple constraints on the same variable accumulate; generation takes the tightest resolved bound.
Enums§
- Expr
- A parsed safe-integer expression. Variables resolve against the scalar values chosen earlier in generation order.
- Format
Line - One recognized input-format line.
- GenMode
- The five ac-test generation modes, in emission order.
- Spec
Error - Why a spec cannot drive generation.
- VarKey
- What a constraint line bounds.
Constants§
- DEFAULT_
SEED_ BASE - ac-test’s default seed base (
0xac7e57). - MAX_
ARRAY_ LENGTH - Maximum array length; longer arrays discard the case (spike #6 §2.5).
Functions§
- generate_
cases - Convenience: parse a spec and generate in one call.