rustkernel_procint/
lib.rs

1//! # RustKernel Process Intelligence
2//!
3//! GPU-accelerated process mining and conformance checking.
4//!
5//! ## Kernels
6//! - `DFGConstruction` - Directly-follows graph construction
7//! - `PartialOrderAnalysis` - Concurrency detection
8//! - `ConformanceChecking` - Multi-model conformance (DFG/Petri/BPMN)
9//! - `OCPMPatternMatching` - Object-centric process mining
10//! - `NextActivityPrediction` - Markov/N-gram next activity prediction
11//! - `EventLogImputation` - Event log quality detection and repair
12//! - `DigitalTwin` - Process simulation for what-if analysis
13//!
14//! ## Features
15//! - Directly-follows graph construction from event logs
16//! - Partial order analysis for concurrency detection
17//! - Conformance checking against DFG and Petri net models
18//! - Object-centric process mining for multi-object workflows
19//! - Next activity prediction using Markov chains and N-grams
20//! - Event log imputation for missing events and timestamp repair
21
22#![warn(missing_docs)]
23
24pub mod conformance;
25pub mod dfg;
26pub mod imputation;
27pub mod ocpm;
28pub mod partial_order;
29pub mod prediction;
30pub mod simulation;
31pub mod types;
32
33/// Prelude for convenient imports.
34pub mod prelude {
35    pub use crate::conformance::*;
36    pub use crate::dfg::*;
37    pub use crate::imputation::*;
38    pub use crate::ocpm::*;
39    pub use crate::partial_order::*;
40    pub use crate::prediction::*;
41    pub use crate::simulation::*;
42    pub use crate::types::*;
43}
44
45// Re-export main kernels
46pub use conformance::ConformanceChecking;
47pub use dfg::DFGConstruction;
48pub use imputation::EventLogImputation;
49pub use ocpm::OCPMPatternMatching;
50pub use partial_order::PartialOrderAnalysis;
51pub use prediction::NextActivityPrediction;
52pub use simulation::DigitalTwin;
53
54// Re-export key types
55pub use types::{
56    AlignmentStep, Arc, ConformanceResult, ConformanceStats, DFGEdge, DFGResult, Deviation,
57    DeviationType, DirectlyFollowsGraph, EventLog, OCPMEvent, OCPMEventLog, OCPMObject,
58    OCPMPatternResult, PartialOrderResult, PetriNet, Place, ProcessEvent, Trace, Transition,
59};
60
61/// Register all process intelligence kernels with a registry.
62pub fn register_all(
63    registry: &rustkernel_core::registry::KernelRegistry,
64) -> rustkernel_core::error::Result<()> {
65    use rustkernel_core::traits::GpuKernel;
66
67    tracing::info!("Registering process intelligence kernels");
68
69    // DFG kernel (1)
70    registry.register_metadata(dfg::DFGConstruction::new().metadata().clone())?;
71
72    // Partial order kernel (1)
73    registry.register_metadata(
74        partial_order::PartialOrderAnalysis::new()
75            .metadata()
76            .clone(),
77    )?;
78
79    // Conformance kernel (1)
80    registry.register_metadata(conformance::ConformanceChecking::new().metadata().clone())?;
81
82    // OCPM kernel (1)
83    registry.register_metadata(ocpm::OCPMPatternMatching::new().metadata().clone())?;
84
85    // Prediction kernel (1)
86    registry.register_metadata(prediction::NextActivityPrediction::new().metadata().clone())?;
87
88    // Imputation kernel (1)
89    registry.register_metadata(imputation::EventLogImputation::new().metadata().clone())?;
90
91    // Simulation kernel (1)
92    registry.register_metadata(simulation::DigitalTwin::new().metadata().clone())?;
93
94    tracing::info!("Registered 7 process intelligence kernels");
95    Ok(())
96}
97
98#[cfg(test)]
99mod tests {
100    use super::*;
101    use rustkernel_core::registry::KernelRegistry;
102
103    #[test]
104    fn test_register_all() {
105        let registry = KernelRegistry::new();
106        register_all(&registry).expect("Failed to register procint kernels");
107        assert_eq!(registry.total_count(), 7);
108    }
109}