kizzasi-logic

Crates.iokizzasi-logic
lib.rskizzasi-logic
version0.1.0
created_at2026-01-19 00:13:43.734312+00
updated_at2026-01-19 00:13:43.734312+00
descriptionTensorLogic bridge for Kizzasi - constraint enforcement and safety guardrails
homepagehttps://github.com/cool-japan/kizzasi
repositoryhttps://github.com/cool-japan/kizzasi
max_upload_size
id2053358
size716,699
KitaSan (cool-japan)

documentation

https://docs.rs/kizzasi-logic

README

kizzasi-logic

Constraint enforcement and safety guardrails for Kizzasi AGSP.

Overview

TensorLogic bridge providing constraint satisfaction, optimization, and safety guarantees for signal prediction. Ensures predictions satisfy physical laws, safety bounds, and domain constraints.

Features

  • Constraint Types: Linear, quadratic, nonlinear, temporal, geometric
  • Temporal Logic: LTL and STL for time-series properties
  • Projection Methods: Gradient-based, Dykstra's alternating, QP solvers
  • Training Integration: Differentiable projections, Lagrangian relaxation
  • Optimization: MPC, Benders decomposition, multi-objective
  • GPU Acceleration: Parallel constraint checking
  • Incremental Solving: Real-time constraint updates

Quick Start

use kizzasi_logic::{RangeConstraint, GuardrailSet, ConstraintChecker};

// Define safety bounds
let position_limit = RangeConstraint::new(0, -10.0, 10.0)?; // dim, min, max
let velocity_limit = RangeConstraint::new(1, -5.0, 5.0)?;

let mut guardrails = GuardrailSet::new();
guardrails.add(Box::new(position_limit));
guardrails.add(Box::new(velocity_limit));

// Check and project predictions
let prediction = Array1::from_vec(vec![12.0, 3.0]); // Violates position limit
let safe_prediction = guardrails.project(&prediction)?; // Projects to [10.0, 3.0]

Constraint Solving

  • Projection algorithms: <10μs for simple constraints
  • Batch processing: 1M constraint checks/sec
  • GPU acceleration: 10x speedup for large batches

Documentation

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Commit count: 1

cargo fmt