TRIEL
An open specification language for deterministic, verifiable compilation.
The problem
Software specifications and their implementations tend to drift apart over time. A specification is written once; the implementation is built, maintained, and modified separately — and the two slowly diverge. This gap is a common source of costly failures, compliance issues, and audit findings.
The approach
TRIEL treats specification-to-implementation translation as the point where correctness evidence should be generated — not recovered afterward through separate testing or review.
Example
EUDI Wallet driving license — issuance and presentation policy.
1-- TRIEL example: EUDI Wallet driving license — issuance and presentation policy23-- Demonstrates: conditional obligations, ZK age predicate, prohibition on stale credentials45SPECIFICATION eudi_driving_license VERSION 1.0.067 STANDARD "ISO-18013-5", "eIDAS-2.0"89 JURISDICTION "EU"1011SUBJECTS {1213 applicant : PARTY,1415 issuer : REGULATOR,1617 verifier : PARTY1819}2021FACTORS {2223 age : ZK<Integer> PROVES(self >= 18) WITHOUT REVEALING self2425 METADATA SOURCE applicant,2627 vision_correction_needed : Boolean METADATA SOURCE issuer,2829 license_category : String METADATA SOURCE issuer,3031 license_valid : Boolean METADATA SOURCE issuer MAX_AGE 24 HOURS3233}3435TERMS {3637 applicant MUST submit_proof(age) BY DATETIME("2026-09-01T00:00:00Z");3839 IF vision_correction_needed THEN4041 issuer MUST attach_restriction("corrective_lenses")4243 ELSE4445 issuer MAY issue_unrestricted_category;4647 verifier MUST_NOT accept_presentation WHEN license_valid == false4849}5051INVARIANTS {5253 license_requires_adult_holder : SAFETY : ALWAYS(age >= 18);5455 presentation_requires_valid_license : SAFETY : ALWAYS(license_valid == true)5657}Where it fits
vs. OPA/Rego
Rego evaluates structured queries at a perimeter — admission control, gateways. It's decoupled from the cryptographic execution layer and can't reach into an MPC circuit or a ZK pipeline. TRIEL expresses compliance constraints at the data-field level, so they can compile into the cryptographic artifacts themselves, not be enforced from outside.
vs. Wysteria/Wys*
These are rigorous languages for secure multiparty computation, built for cryptographers who already understand type theory and principal-splitting. TRIEL is aimed the other direction — non-cryptographers (compliance officers, analysts) writing and auditing declarative invariants, with low-level cryptographic targeting handled at compilation time.
Why this matters now
Digital identity, verifiable credentials, and privacy-preserving proofs are moving from research into regulation. A readable, compilable spec language lets compliance and engineering share one artifact.