Files
zen/core/expression
Stefan c78819de95 fix(engine): keep decision table analysis memory and time in proportion to the table
Schema queries no longer run table verification; graph table checks are deferred to diagnostics.

Gap search and unreachable-rule cover run on per-dimension bitsets when the table is small enough to index densely, and on the set-based path otherwise. Missing cases are merged on interned ids and rendered lazily.

Compression works on borrowed rows and interned cell ids, assigned once per round. Small string sets are held inline or as a sorted list instead of a tree.

Findings are unchanged: the previous implementations stay as test-only references and are compared on generated tables, and tests/table_scaling.rs bounds peak memory with a counting allocator.
2026-11-19 14:30:47 +01:00
..
2026-09-29 09:59:44 +02:00
2026-11-10 10:20:26 +01:00
2026-11-10 10:20:26 +01:00

ZEN Expression Language

The expression language of ZEN Engine, the open-source Business Rules Engine (BRE) from GoRules.

License: MIT crates.io

ZEN expressions are readable by business users and fast enough for hot paths: a complete language for conditions, calculations and data transformation, with lexer, parser, compiler, VM, type checking and editor completions included in this crate.

use serde_json::json;
use zen_expression::evaluate_expression;

fn main() {
    let result = evaluate_expression(
        "sum(items) * multiplier",
        json!({ "items": [10, 20, 30], "multiplier": 2 }).into(),
    )
    .unwrap();
    // => 120
}

Reusable expressions compile once via compile_expression and evaluate repeatedly against different contexts.

Resources

License

MIT License