Locy¶
Locy is Uni's logic programming layer: Logic + Cypher. It extends OpenCypher with recursive rules, hypothetical reasoning, graph derivation, and abductive remediation workflows.
Who This Is For¶
- Application engineers who need graph reasoning beyond one-shot queries.
- Data and policy teams modeling compliance, access control, and propagation rules.
- Advanced users who want compiler/runtime internals and TCK-level semantics.
What You Get¶
- Declarative rules with recursion (
CREATE RULE). - Goal-directed evaluation (
QUERY). - Hypothetical analysis (
ASSUME ... THEN). - Remediation search (
ABDUCE). - Derivation/proof explainability (
EXPLAIN RULE). - Graph materialization (
DERIVE).
Start Here¶
- Read Foundations.
- Run the Quickstart.
- Learn syntax in Language Guide.
- Move to Advanced Features.
Locy vs Plain Cypher¶
Use plain Cypher when you need direct reads/writes on existing graph state. Use Locy when you need:
- Recursive closure and fixed-point reasoning.
- Explainable inferred facts.
- What-if analysis with rollback boundaries.
- Suggested minimal changes to satisfy or prevent outcomes.
API Entry Points¶
- Rust:
db.locy().evaluate(...)anddb.locy().evaluate_with_config(...). - Python:
db.locy_evaluate(...)andawait adb.locy_evaluate(...).