VBL Predicates: Named Logical Expressions
Defining Predicates
Section titled “Defining Predicates”A predicate binds a name to a logical expression:
predicate: sufficient_funds: account_balance >= transaction_amountpredicate: risk_acceptable: risk_score <= 75predicate: amount_within_limit: transaction_amount <= 50000Each predicate has:
- Name: a unique identifier (lowercase, alphanumeric + underscore)
- Expression: a comparison that evaluates to true or false
Predicate Names
Section titled “Predicate Names”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
Comparison Operators
Section titled “Comparison Operators”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 |
Integer Comparisons
Section titled “Integer Comparisons”predicate: creditworthy: credit_score >= 600predicate: within_authority: loan_amount_cents <= 500000String Comparisons
Section titled “String Comparisons”predicate: read_only: access_level == "read_only"Boolean Comparisons
Section titled “Boolean Comparisons”predicate: sanctions_ok: sanctions_cleared == truepredicate: not_break_glass: is_break_glass == falseField-to-Field Comparisons
Section titled “Field-to-Field Comparisons”predicate: dosage_safe: prescribed_mg <= max_daily_mgpredicate: refund_ok: refund_amount_cents <= order_total_centsSet Membership
Section titled “Set Membership”predicate: not_blocked: destination_country NOT IN @blocked_jurisdictionspredicate: severity_actionable: severity IN ("HIGH", "CRITICAL")predicate: modality_cleared: modality IN @cleared_modalitiesList Containment
Section titled “List Containment”predicate: has_required_approver: approver_list CONTAINS "compliance_officer"Failure Messages
Section titled “Failure Messages”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.
Conjunctive Evaluation
Section titled “Conjunctive Evaluation”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 passpredicate: affordable: debt_to_income_pct <= 40 # must passpredicate: established: account_age_months >= 6 # must passpredicate: identity_confirmed: identity_verified == 1 # must passAll four must evaluate to true. If affordable fails, the result is DEFER even if all others pass.
No Short-Circuit Within Stage 3
Section titled “No Short-Circuit Within Stage 3”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 vs. BOUNDARY Expression
Section titled “Predicates vs. BOUNDARY Expression”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.
Next Steps
Section titled “Next Steps”- BOUNDARY Expressions: inline expressions with complex logic
- Operators: comparison and logical operators
- Integer Semantics: how arithmetic works
