Skip to main content

decy_oracle/
lib.rs

1//! Decy Oracle: CITL pattern mining and fix suggestions for C-to-Rust transpilation
2//!
3//! This crate provides Tarantula fault localization to identify C language features
4//! most correlated with transpilation failures, and suggest fixes.
5//!
6//! # Architecture
7//!
8//! ```text
9//! ┌─────────────────────┐     ┌──────────────────┐
10//! │  C Source Files     │────►│  CorpusCITL      │
11//! │  (transpilation)    │     │  Pattern Mining  │
12//! └─────────────────────┘     └──────────────────┘
13//!                                      │
14//!                                      ▼
15//!                              ┌──────────────────┐
16//!                              │  DecisionCITL    │
17//!                              │  (Tarantula)     │
18//!                              └──────────────────┘
19//!                                      │
20//!                                      ▼
21//!                              ┌──────────────────┐
22//!                              │  DecyOracle      │
23//!                              │  (Fix Suggestions)│
24//!                              └──────────────────┘
25//! ```
26//!
27//! # Features
28//!
29//! - `citl`: Enable entrenar CITL integration for pattern mining
30
31#![allow(missing_docs)]
32#![deny(unsafe_code)]
33
34// Core modules
35pub mod baseline;
36pub mod config;
37pub mod context;
38pub mod decisions;
39pub mod error;
40pub mod metrics;
41pub mod oracle;
42
43// Golden trace system
44pub mod golden_trace;
45pub mod trace_verifier;
46
47// Dataset and import
48pub mod bootstrap;
49pub mod dataset;
50pub mod diversity;
51pub mod import;
52pub mod retirement;
53pub mod verification;
54
55// CITL pattern mining (DECY-136)
56#[cfg(feature = "citl")]
57pub mod corpus_citl;
58
59// Re-exports
60pub use baseline::{aggregate_measurements, BaselineMetrics, FileMeasurement};
61pub use config::OracleConfig;
62pub use context::{CConstruct, CDecisionContext};
63pub use decisions::CDecisionCategory;
64pub use error::OracleError;
65pub use golden_trace::{GoldenTrace, TraceTier};
66pub use import::SmartImportConfig;
67pub use metrics::{CIReport, CIThresholds, OracleMetrics};
68pub use oracle::{DecyOracle, RustcError};
69pub use retirement::PatternRetirementPolicy;
70pub use trace_verifier::{TraceVerifier, VerificationLevel, VerifierConfig};
71
72#[cfg(feature = "citl")]
73pub use corpus_citl::{CFeature, CorpusCITL, IngestionStats};
74
75#[cfg(test)]
76#[path = "bootstrap_coverage_tests.rs"]
77mod bootstrap_coverage_tests;
78
79#[cfg(test)]
80#[path = "config_coverage_tests.rs"]
81mod config_coverage_tests;
82
83#[cfg(test)]
84#[path = "verification_coverage_tests.rs"]
85mod verification_coverage_tests;
86
87#[cfg(test)]
88#[path = "dataset_coverage_tests.rs"]
89mod dataset_coverage_tests;
90
91#[cfg(test)]
92#[path = "import_coverage_tests.rs"]
93mod import_coverage_tests;
94
95#[cfg(test)]
96#[path = "bootstrap_deep_tests.rs"]
97mod bootstrap_deep_tests;