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"1011 PROOF_SYSTEM: GROTH161213 CURVE: "BN254"1415SUBJECTS {1617 applicant : PARTY DID "did:web:eudi-wallet.example.eu:applicant",1819 issuer : REGULATOR,2021 verifier : PARTY2223}2425TERMS {2627 applicant MUST submit_proof(age) BY DATETIME("2026-09-01T00:00:00Z");2829 IF vision_correction_needed THEN3031 issuer MUST attach_restriction("corrective_lenses")3233 ELSE3435 issuer MAY issue_unrestricted_category;3637 verifier MUST_NOT accept_presentation WHEN license_valid == false3839}4041FACTORS {4243 age : ZK<Integer> PROVES(self >= 18) WITHOUT REVEALING self4445 BOUND_TO(applicant, presentation_nonce)4647 METADATA SOURCE applicant,4849 age_proof_valid : Boolean METADATA SOURCE applicant,5051 presentation_nonce : Hash METADATA SOURCE verifier,5253 vision_correction_needed : Boolean METADATA SOURCE issuer,5455 license_category : String METADATA SOURCE issuer,5657 license_valid : Boolean METADATA SOURCE issuer MAX_AGE 24 HOURS5859}6061INVARIANTS {6263 license_requires_adult_holder : SAFETY : ALWAYS(age_proof_valid == true);6465 presentation_requires_valid_license : SAFETY : ALWAYS(license_valid == true)6667}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.