Skip to main content

urge_core/
lib.rs

1//! # urge-core
2//!
3//! The `no_std`-compatible kernel of the Universal Reasoning Governance Engine.
4//!
5//! ## Architecture
6//!
7//! URGE implements a Unicode semantic dictionary and multi-logic processing
8//! architecture for modular reasoning systems. The core concept — the
9//! **Figure 26** Adaptive Processing Workflow, named for the diagram in the
10//! original design document — is a deterministic pipeline:
11//!
12//! ```text
13//! Input
14//!   │
15//!   ▼
16//! [Tokenizer]  ─── Unicode Semantic Dictionary ───► Operator symbols mapped to paradigms
17//!   │
18//!   ▼
19//! [Paradigm Detector]  ──────────────────────────► Set of active LogicParadigms
20//!   │
21//!   ▼
22//! [AST Builder]  ────────────────────────────────► Typed expression tree
23//!   │
24//!   ▼
25//! [Engine Router / SWITCH]  ─────────────────────► Per-paradigm engine selected
26//!   │
27//!   ▼
28//! [Cross-System Validator]  ─────────────────────► Contradiction detection
29//!   │
30//!   ▼
31//! Verdict { valid, confidence, trace, formal_notation }
32//! ```
33//!
34//! Each stage is fully auditable. Every routing and validation decision is captured
35//! in the `LogicTrace`, making the entire reasoning chain inspectable after the fact.
36//!
37//! ## Deployment targets
38//!
39//! | Feature flags      | Target                                   |
40//! |--------------------|------------------------------------------|
41//! | (none / heapless)  | Bare-metal firmware, BIOS-like chip      |
42//! | `alloc`            | RTOS, microkernel with allocator         |
43//! | `std`              | Linux/macOS/Windows process              |
44//!
45//! The `alloc` feature enables heap-allocated AST nodes. Without it, expression
46//! depth is bounded by the fixed-size `heapless` structures.
47
48#![cfg_attr(not(feature = "std"), no_std)]
49
50#[cfg(feature = "alloc")]
51extern crate alloc;
52
53pub mod ast;
54pub mod decision;
55pub mod engine;
56pub mod symbol;
57
58// Re-export the key public surface
59pub use ast::{AstNode, Expr, Literal};
60pub use decision::{Confidence, CrossValidation, LogicTrace, TraceEntry, Verdict};
61pub use engine::{EngineError, EngineId, LogicEngine, Paradigm};
62pub use symbol::{SemanticClass, Symbol, UnicodeSemanticDictionary};