Skip to main content

Module fuzzing

Module fuzzing 

Source
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§

ExprGenConfig
Configuration for random expression generation.
ExprGenerator
Random expression generator.
FuzzStats
Fuzz testing statistics.
GraphGenConfig
Configuration for graph generation
SimpleRng
Simple deterministic random number generator for reproducible tests. Uses a linear congruential generator.

Enums§

MutationKind
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.