Skip to main content

trueno_ptx_debug/
lib.rs

1//! trueno-ptx-debug: Pure Rust PTX debugging and static analysis tool
2//!
3//! This crate provides static analysis capabilities for PTX (Parallel Thread Execution)
4//! code, implementing the Popperian falsification framework for systematic bug detection.
5//!
6//! # Architecture
7//!
8//! The analyzer is structured into several components:
9//! - **Parser**: Lexer and AST construction for PTX source
10//! - **Analyzer**: Static analysis passes (type, control flow, data flow, address space)
11//! - **Bugs**: Bug pattern definitions and registry
12//! - **Falsification**: 100-point Popperian testing framework
13//! - **Output**: Report generation (HTML, FKR tests)
14//!
15//! # Philosophy
16//!
17//! Pure Rust PTX Analysis - Zero CUDA SDK Dependency.
18//! Following Popper's falsificationism: we cannot prove PTX correct, but we can
19//! systematically attempt to falsify it.
20
21#![warn(missing_docs)]
22// Allow these clippy lints for the PTX debug tool (parser/analyzer code)
23#![allow(clippy::must_use_candidate)]
24#![allow(clippy::missing_errors_doc)]
25#![allow(clippy::unnecessary_wraps)]
26#![allow(clippy::unused_self)]
27#![allow(clippy::missing_panics_doc)]
28#![allow(clippy::struct_excessive_bools)]
29#![allow(clippy::similar_names)]
30#![allow(clippy::match_same_arms)]
31#![allow(clippy::map_unwrap_or)]
32#![allow(clippy::too_many_lines)]
33#![allow(clippy::module_name_repetitions)]
34#![allow(clippy::redundant_else)]
35#![allow(clippy::needless_range_loop)]
36#![allow(clippy::doc_markdown)]
37#![allow(clippy::for_kv_map)]
38#![allow(clippy::missing_fields_in_debug)]
39#![allow(clippy::if_not_else)]
40#![allow(clippy::cast_lossless)]
41#![allow(clippy::cast_precision_loss)]
42#![allow(clippy::format_push_string)]
43#![allow(missing_docs)]
44
45pub mod analyzer;
46pub mod bugs;
47pub mod falsification;
48pub mod output;
49pub mod parser;
50
51// Re-export key types
52pub use analyzer::{AddressSpaceValidator, ControlFlowAnalyzer, DataFlowAnalyzer, TypeChecker};
53pub use bugs::{BugClass, BugRegistry, Severity};
54pub use falsification::{FalsificationRegistry, FalsificationReport, TestResult};
55pub use parser::{Lexer, ParseError, Parser, PtxModule};