Skip to main content

Module pattern_heuristic

Module pattern_heuristic 

Source
Expand description

Structural heuristics for GoF pattern detection.

Each heuristic checks for structural evidence of a pattern — not proof. They are intentionally permissive to avoid false negatives: it’s better to verify a module that loosely matches than to miss one that clearly does.

A heuristic returning true means “there is structural evidence consistent with this pattern.” It does NOT mean “this code correctly implements the pattern.” The promotion from planned to verified reflects structural alignment, not behavioral correctness.

Functions§

check_adapter
Check if Rust source code structurally matches the Adapter pattern.
check_builder
Check if Rust source code structurally matches the Builder pattern.
check_command
Check if Rust source code structurally matches the Command pattern.
check_decorator
Check if Rust source code structurally matches the Decorator pattern.
check_facade
Check if Rust source code structurally matches the Facade pattern (H3).
check_factory
Check if Rust source code structurally matches the Factory pattern.
check_module_pattern
Scan all .rs files in a module’s source directory for structural evidence.
check_observer
Check if Rust source code structurally matches the Observer pattern (H1).
check_pattern
Run the appropriate heuristic for a named GoF pattern.
check_singleton
Check if Rust source code structurally matches the Singleton pattern.
check_strategy
Check if Rust source code structurally matches the Strategy pattern (H2).