Expand description
AIngle Logic - Proof-of-Logic Validation Engine
This crate provides logical reasoning and validation for semantic graphs. Unlike traditional blockchain consensus that only validates cryptographic signatures, Proof-of-Logic validates the logical consistency of data.
§Architecture
┌─────────────────────────────────────────────────────────────┐
│ Proof-of-Logic Engine │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Rule Engine │ │
│ │ Forward Chaining │ Backward Chaining │ Unification │ │
│ └──────────────────────────────────────────────────────┘ │
│ │ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Rule Types │ │
│ │ Integrity │ Authority │ Temporal │ Inference │ │
│ └──────────────────────────────────────────────────────┘ │
│ │ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Validator │ │
│ │ Contradiction Detection │ Proof Generation │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘§Example
ⓘ
use aingle_logic::{RuleEngine, Rule, BuiltinRules};
use aingle_graph::{Triple, NodeId, Predicate, Value};
// Create a rule engine with built-in rules
let mut engine = RuleEngine::with_rules(BuiltinRules::minimal());
// Validate a triple
let triple = Triple::new(
NodeId::named("alice"),
Predicate::named("knows"),
Value::Node(NodeId::named("bob")),
);
let result = engine.validate(&triple);
assert!(result.is_valid());Re-exports§
pub use builtin::BuiltinRules;pub use engine::EngineStats;pub use engine::InferenceMode;pub use engine::RuleEngine;pub use error::Error;pub use error::Result;pub use proof::LogicProof;pub use proof::ProofStep;pub use proof::ProofVerifier;pub use rule::Action;pub use rule::Condition;pub use rule::Rule;pub use rule::RuleKind;pub use rule::RuleSet;pub use validator::LogicValidator;pub use validator::Severity;pub use validator::ValidationError;pub use validator::ValidationResult;
Modules§
- builtin
- Built-in rules for common validation scenarios
- engine
- Rule Engine with Forward and Backward Chaining
- error
- Error types for the AIngle Logic engine.
- proof
- Logic Proof Generation and Verification
- rule
- Rule definitions for the Proof-of-Logic engine
- validator
- Logic Validator - Validates logical consistency of semantic graphs
Constants§
- VERSION
- Version information