jugar_probar/coverage/mod.rs
1//! WASM Coverage Tooling for Probar
2//!
3//! Per spec: `docs/specifications/probar-wasm-coverage-tooling.md`
4//!
5//! This module implements a novel WASM coverage instrumentation framework
6//! using the Batuta Sovereign AI Stack primitives.
7//!
8//! # Architecture
9//!
10//! ```text
11//! ┌─────────────────────────────────────────────────────────────────┐
12//! │ PROBAR COVERAGE ARCHITECTURE │
13//! ├─────────────────────────────────────────────────────────────────┤
14//! │ WASM Module → Block Decomposer → Coverage Executor → Report │
15//! │ ↓ ↓ │
16//! │ CFG Analysis Trueno SIMD Aggregation │
17//! └─────────────────────────────────────────────────────────────────┘
18//! ```
19//!
20//! # Toyota Way Principles Applied
21//!
22//! - **Poka-Yoke**: Type-safe BlockId, FunctionId, EdgeId prevent errors
23//! - **Muda**: Thread-local buffering eliminates atomic contention
24//! - **Jidoka**: Soft Jidoka distinguishes Stop vs LogAndContinue
25//! - **Heijunka**: Superblock tiling amortizes scheduling overhead
26
27mod block;
28mod collector;
29mod executor;
30pub mod formatters;
31mod hypotheses;
32mod jidoka;
33mod memory;
34mod report;
35mod superblock;
36mod thread_local;
37
38pub use block::{BlockId, EdgeId, FunctionId};
39pub use collector::{CoverageCollector, CoverageConfig, Granularity};
40pub use executor::{CoverageExecutor, SuperblockResult};
41pub use formatters::{CoberturaFormatter, HtmlFormatter, HtmlReportConfig, LcovFormatter, Theme};
42pub use hypotheses::{CoverageHypothesis, NullificationConfig, NullificationResult};
43pub use jidoka::{CoverageViolation, JidokaAction, TaintedBlocks};
44pub use memory::CoverageMemoryView;
45pub use report::{BlockCoverage, CoverageReport, CoverageSummary};
46pub use superblock::{Superblock, SuperblockBuilder, SuperblockId};
47pub use thread_local::ThreadLocalCounters;
48
49#[cfg(test)]
50mod tests;