rust_rule_engine/backward/mod.rs
1//! # Backward Chaining Module
2//!
3//! Goal-driven reasoning system for rust-rule-engine.
4//! This module is only available when the `backward-chaining` feature is enabled.
5//!
6//! ## Overview
7//!
8//! Backward chaining works by starting from a goal and working backwards
9//! to find rules and facts that can prove that goal.
10//!
11//! ## Example
12//!
13//! ```ignore
14//! use rust_rule_engine::backward::*;
15//!
16//! let bc_engine = BackwardEngine::new(kb);
17//! let result = bc_engine.query("User.IsVIP == true", &facts)?;
18//!
19//! if result.provable {
20//! println!("Goal is provable!");
21//! println!("Proof: {:?}", result.proof_trace);
22//! }
23//! ```
24
25pub mod goal;
26pub mod search;
27pub mod backward_engine;
28pub mod query;
29pub mod grl_query;
30pub mod expression;
31pub mod rule_executor;
32pub mod unification;
33
34// Re-export main types
35pub use goal::{Goal, GoalStatus, GoalManager};
36pub use search::{SearchStrategy, SearchResult};
37pub use backward_engine::{BackwardEngine, BackwardConfig};
38pub use query::{QueryResult, ProofTrace};
39pub use grl_query::{GRLQuery, GRLQueryParser, GRLQueryExecutor, GRLSearchStrategy, QueryAction};
40pub use expression::{Expression, ExpressionParser};
41pub use rule_executor::RuleExecutor;
42pub use unification::{Bindings, Unifier};