How lwagner94/wasmut works
Main Components
a) Core Components:
• Input Processing Layer
• WASM Module Reader
• Configuration Parser
• CLI Arguments Handler
b) Mutation Engine:
• Mutation Operator System
• Meta-mutant Generator
• Coverage Analyzer
c) Execution Engine:
• WASI Runtime (Wasmer)
• Execution Controller
• Timeout Manager
d) Reporting System:
• Multiple Reporter Types (CLI, HTML, JSON)
• Source Code Rewriter
• Template Engine
Specific Implementation Details
┌─ Input Layer ─────────────────────┐
• WASM Module (.wasm) │
• Configuration (wasmut.toml) │
• CLI Arguments │
• ┬───────────────────┘
• ↓
┌─ Mutation Engine ─────────────────┐
• ┌─ Operator System ─────────────┐ │
• Binary Operators │ │
• Unary Operators │ │
• Relational Operators │ │
• Constant Operators │ │
• ┘ │
• ┌─ Meta-mutant System ──────────┐ │
• Mutation Aggregator │ │
• Flag Controller │ │
• ┘ │
• ┬───────────────────┘
• ↓
┌─ Execution Engine ────────────────┐
• ┌─ Wasmer Runtime ─────────────┐ │
• WASI Implementation │ │
• Cycle Counter │ │
• ┘ │
• ┌─ Execution Controller ────────┐ │
• Timeout Management │ │
• Coverage Tracking │ │
• ┘ │
• ┬───────────────────┘
• ↓
┌─ Reporting System ────────────────┐
• ┌─ Reporters ──────────────────┐ │
• CLI Reporter │ │
• HTML Reporter │ │
• JSON Reporter │ │
• ┘ │
• ┌─ Source Analysis ────────────┐ │
• DWARF Debug Info │ │
• Path Rewriting │ │
• ┘ │
• ┘
Technical Details to Emphasize
• WASI compatibility
• DWARF debug information usage
• Multi-threaded execution support
• Template-based reporting system
• File system mapping capabilities