aingle_logic 0.1.0

Proof-of-Logic validation engine for AIngle semantic graphs
Documentation

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());