Expand description
Fuzzing and stress testing infrastructure for the IR.
This module provides tools for testing the robustness of the TensorLogic IR through:
- Stress testing with deeply nested expressions
- Edge case testing (empty, large, boundary values)
- Invariant checking across operations
- Malformed input handling
- Random expression generation for property-based testing
- Mutation-based fuzzing
The module supports both deterministic stress tests and random property-based testing through proptest integration.
Structs§
- Expr
GenConfig - Configuration for random expression generation.
- Expr
Generator - Random expression generator.
- Fuzz
Stats - Fuzz testing statistics.
- Graph
GenConfig - Configuration for graph generation
- Simple
Rng - Simple deterministic random number generator for reproducible tests. Uses a linear congruential generator.
Enums§
- Mutation
Kind - Mutation operations for expressions.
Functions§
- check_
expression_ invariants - Check invariants for an expression.
- create_
deep_ negation - Create a deeply nested expression for stress testing.
- create_
nested_ quantifiers - Create nested quantifiers for stress testing.
- create_
wide_ and - Create a wide AND expression for stress testing.
- create_
wide_ or - Create a wide OR expression for stress testing.
- fuzz_
expression_ operations - Test expression operations for robustness.
- fuzz_
graph_ validation - Test graph validation for robustness.
- gen_
random_ graph - Generate a random graph for testing
- multi_
mutate - Apply multiple random mutations to an expression
- mutate_
expr - Mutate an expression
- random_
mutation - Apply a random mutation to an expression
- test_
expression_ edge_ cases - Test edge cases for expressions.
- test_
graph_ edge_ cases - Test edge cases for graphs.