Skip to content

VBL Predicates: Named Logical Expressions

A predicate binds a name to a logical expression:

predicate: sufficient_funds: account_balance >= transaction_amount
predicate: risk_acceptable: risk_score <= 75
predicate: amount_within_limit: transaction_amount <= 50000

Each predicate has:

  • Name: a unique identifier (lowercase, alphanumeric + underscore)
  • Expression: a comparison that evaluates to true or false

Predicate names follow evidence class naming rules:

  • Start with a lowercase letter
  • Contain only lowercase alphanumeric characters and underscores
  • Must be unique within the boundary
  • Cannot be a reserved keyword

Predicates support all comparison operators:

Operator Meaning
== Equal to
!= Not equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
predicate: creditworthy: credit_score >= 600
predicate: within_authority: loan_amount_cents <= 500000
predicate: read_only: access_level == "read_only"
predicate: sanctions_ok: sanctions_cleared == true
predicate: not_break_glass: is_break_glass == false
predicate: dosage_safe: prescribed_mg <= max_daily_mg
predicate: refund_ok: refund_amount_cents <= order_total_cents
predicate: not_blocked: destination_country NOT IN @blocked_jurisdictions
predicate: severity_actionable: severity IN ("HIGH", "CRITICAL")
predicate: modality_cleared: modality IN @cleared_modalities
predicate: has_required_approver: approver_list CONTAINS "compliance_officer"

Attach a human-readable failure message to a predicate:

predicate: sanctions_ok: sanctions_cleared == true | "Sanctions screening must clear"
predicate: refund_ok: refund_amount_cents <= order_total_cents | "Refund cannot exceed order total"

Messages are metadata-only: they appear in failure reasons but do not affect evaluation outcome.

All predicates are evaluated conjunctively: every predicate must pass for the evaluation to produce ASSERT. If any predicate fails, the result is DEFER.

predicate: creditworthy: credit_score >= 600 # must pass
predicate: affordable: debt_to_income_pct <= 40 # must pass
predicate: established: account_age_months >= 6 # must pass
predicate: identity_confirmed: identity_verified == 1 # must pass

All four must evaluate to true. If affordable fails, the result is DEFER even if all others pass.

All predicates are evaluated even if an earlier predicate fails. Both branches of AND/OR expressions are always evaluated. This ensures deterministic instruction counting: the execution path does not depend on predicate ordering.

All failing predicates appear in the failure_reasons response, giving the caller complete visibility into what needs to change.

Predicates define individual conditions evaluated conjunctively (all AND). The BOUNDARY expression uses inline field comparisons with full logical operators (AND, OR, NOT, grouping).

If you define predicates without a BOUNDARY expression, the predicates alone determine the verdict. If you define a BOUNDARY expression, it is evaluated in addition to the predicates: both must pass.

Use predicates alone when all conditions must pass (conjunctive). Use a BOUNDARY block when you need OR, NOT, or complex grouping.