HoloLang

HoloLang is a formula language, close to Excel, for checking extracted data against your business rules. This page covers why it exists, five starter rules, and the reference chapters.

Why HoloLang?

Validating extracted documents requires complex business rules that change frequently. HoloLang separates these rules from application code, allowing:

  • Domain experts to write and maintain validation rules directly
  • Readable syntax that mirrors accounting terminology
  • Safe execution with no side effects or security risks
  • Tolerance-based comparisons for floating-point accounting values

Quick Start

Five rules covering the most common validation patterns:

Five Essential HoloLang Rules

# 1. Required field - ensure a field is present
REQUIRED @company_name

# 2. Format validation - validate SIRET number format
VALIDATE @company_siret FORMAT SIRET

# 3. Balance check - assets must equal liabilities (within tolerance)
ASSERT @total_assets == @total_liabilities WITHIN 10

# 4. Conditional rule - require capital for SARL companies
IF @company_type == 'SARL' THEN REQUIRED @capital_social

# 5. Warning - alert on negative equity (non-blocking)
WARN IF @equity < 0

Reference Chapters

The full reference is organized in four chapters:

  • Syntax: field references, literals, operators, functions and predicates, date operations and aggregate functions
  • Rule Types: REQUIRED, VALIDATE FORMAT, ASSERT, IF/THEN and WARN, plus length validation and formulas
  • Sealed & Derived Fields: verdict fields published by FORMAT validators, and the 2D-Doc sealed-field catalogue per document type
  • Examples & Behavior: a complete CERFA example, evaluation behaviors and error messages