ringkernel_procint/lib.rs
1//! # RingKernel Process Intelligence
2//!
3//! GPU-accelerated process mining and intelligence with real-time visualization.
4//!
5//! This crate provides tools for analyzing business processes through:
6//!
7//! - **DFG Construction**: Build Directly-Follows Graphs from event streams
8//! - **Partial Order Mining**: Discover concurrent activity patterns
9//! - **Pattern Detection**: Identify bottlenecks, loops, rework, and anomalies
10//! - **Conformance Checking**: Validate traces against reference models
11//!
12//! ## Architecture
13//!
14//! ```text
15//! ┌─────────────────┐ ┌──────────────────┐ ┌────────────────┐
16//! │ Data Fabric │────▶│ GPU Kernels │────▶│ Visualization │
17//! │ (Event Stream) │ │ (CUDA/WGSL) │ │ (egui Canvas) │
18//! └─────────────────┘ └──────────────────┘ └────────────────┘
19//! │ │ │
20//! ▼ ▼ ▼
21//! ┌─────────────────┐ ┌──────────────────┐ ┌────────────────┐
22//! │ Sector Templates│ │ DFG Construction │ │ Force Layout │
23//! │ Event Generator │ │ Pattern Detection│ │ Token Animation│
24//! │ Anomaly Inject │ │ Conformance Check│ │ Timeline View │
25//! └─────────────────┘ └──────────────────┘ └────────────────┘
26//! ```
27//!
28//! ## Quick Start
29//!
30//! ```rust,ignore
31//! use ringkernel_procint::prelude::*;
32//!
33//! // Create event generator for healthcare sector
34//! let config = GeneratorConfig::default()
35//! .with_sector(SectorTemplate::Healthcare)
36//! .with_events_per_second(10_000);
37//! let mut generator = ProcessEventGenerator::new(config);
38//!
39//! // Generate events and build DFG
40//! let events = generator.generate_batch(1000);
41//! let dfg = DFGBuilder::new().build_from_events(&events);
42//!
43//! // Detect patterns
44//! let patterns = PatternDetector::new().detect(&dfg);
45//! ```
46//!
47//! ## GPU Kernel Types
48//!
49//! 1. **DFG Construction** - Batch kernel for edge frequency counting
50//! 2. **Partial Order Derivation** - Stencil kernel for precedence matrix
51//! 3. **Pattern Detection** - Batch kernel for bottleneck/loop/rework detection
52//! 4. **Conformance Checking** - Batch kernel for fitness scoring
53
54#![warn(missing_docs)]
55#![warn(clippy::all)]
56
57pub mod actors;
58pub mod analytics;
59pub mod cuda;
60pub mod fabric;
61pub mod gui;
62pub mod kernels;
63pub mod models;
64
65/// Prelude for convenient imports.
66pub mod prelude {
67 // Core types
68 pub use crate::models::{
69 Activity, ActivityId, AlignmentMove, AlignmentType, ComplianceLevel, ConformanceResult,
70 ConformanceStatus, DFGGraph, EventType, GpuDFGEdge, GpuDFGGraph, GpuDFGNode,
71 GpuObjectEvent, GpuPartialOrderTrace, GpuPatternMatch, HybridTimestamp, PatternSeverity,
72 PatternType, ProcessModel, ProcessTrace, TraceId,
73 };
74
75 // Data fabric
76 pub use crate::fabric::{
77 AnomalyConfig, GeneratorConfig, GeneratorStats, PipelineConfig, ProcessEventGenerator,
78 ProcessingPipeline, SectorTemplate,
79 };
80
81 // Analytics
82 pub use crate::analytics::{
83 AnalyticsEngine, DFGMetrics, DFGMetricsCalculator, KPITracker, PatternAggregator,
84 ProcessKPIs,
85 };
86
87 // Actors
88 pub use crate::actors::{GpuActorRuntime, PipelineCoordinator, PipelineStats, RuntimeConfig};
89
90 // Kernels
91 pub use crate::kernels::{
92 ConformanceKernel, DfgConstructionKernel, PartialOrderKernel, PatternDetectionKernel,
93 };
94}
95
96/// Version information.
97pub const VERSION: &str = env!("CARGO_PKG_VERSION");
98
99/// Crate name.
100pub const NAME: &str = env!("CARGO_PKG_NAME");