Skip to content

VBL BOUNDARY Expressions: Inline Evaluation Logic

Named predicates are evaluated conjunctively: all must pass. This is sufficient for most boundaries:

predicate: creditworthy: credit_score >= 600
predicate: affordable: debt_to_income_pct <= 40
predicate: established: account_age_months >= 6

When you need OR, NOT, or complex grouping, use a BOUNDARY block:

BOUNDARY {
(oncall_approved == 1 AND steps_completed >= 1) OR
NOT severity_level >= 1
}

The BOUNDARY block contains inline field comparisons combined with logical operators:

BOUNDARY {
confidence_level >= 80 AND severity IN ("HIGH", "CRITICAL") AND
indicator_type IN @containable_threats AND
(affected_systems <= 50 OR NOT critical_systems_impacted == 0)
}

The expression inside the block uses the same comparison operators, set membership, and containment operators available in predicates: but combined with OR, NOT, and parenthesized grouping.

Operator Meaning Precedence
NOT Logical negation Highest
AND Logical conjunction Middle
OR Logical disjunction Lowest

NOT binds tightest, then AND, then OR. Use parentheses to override:

BOUNDARY {
(beneficiary_verified == 1 OR amount_cents < 100000) AND
routing_valid == 1
}

Without parentheses, beneficiary_verified == 1 OR amount_cents < 100000 AND routing_valid == 1 would evaluate as beneficiary_verified == 1 OR (amount_cents < 100000 AND routing_valid == 1).

The BOUNDARY expression contains inline field comparisons:

BOUNDARY {
refund_amount_cents <= order_total_cents AND risk_score <= 30 AND
(return_eligible == 1 OR
(NOT order_total_cents >= 10000 AND refund_reason IN @auto_refund_reasons))
}

All operators available in predicates work inside BOUNDARY blocks: comparisons, IN, NOT IN, CONTAINS, boolean and string literals, and field-to-field comparisons.

An empty BOUNDARY block is valid:

BOUNDARY { }

Zero inline comparisons, always passes Stage 3. This is useful when the boundary only enforces admissibility and prohibition constraints.

AND and OR expressions always evaluate both branches, regardless of the left-side result. This ensures deterministic instruction counting:

  • false AND expr: expr is still evaluated
  • true OR expr: expr is still evaluated

This differs from most programming languages where && and || short-circuit. The design ensures that evaluation timing does not depend on evidence values.

Named predicates and BOUNDARY blocks are both evaluated in Stage 3. All named predicates must pass (conjunctively), and the BOUNDARY expression must also evaluate to true. Both must succeed for an ASSERT verdict.