Skip to content

Tedefo 4806 tighter type checking#130

Merged
bertrand-lorentz merged 8 commits intodevelopfrom
TEDEFO-4806-tighter-type-checking
Feb 3, 2026
Merged

Tedefo 4806 tighter type checking#130
bertrand-lorentz merged 8 commits intodevelopfrom
TEDEFO-4806-tighter-type-checking

Conversation

@rousso
Copy link
Contributor

@rousso rousso commented Feb 2, 2026

This PR implements tighter type checking across the EFX toolkit and introduces EFX Rules to Schematron translation capabilities.

Type Checking Infrastructure:

  • Implements EfxTypeLattice for type variant management
  • Adds TypeChecker interface for SDK-specific type validation
  • Refactors expression model with separate scalar/sequence hierarchies (adapting to TEDEFO-4807/4808)
  • Introduces ConsistencyCheckException for better error diagnostics

EFX Rules Translation:

  • Adds foundation for EFX Rules to Schematron transpilation
  • Implements EfxRulesTranslator with comprehensive test coverage
  • Enhances symbol resolution for notice subtypes and attribute fields
  • Refactors generator interfaces for clarity (ValidatorGenerator, SchematronGenerator)

Supporting Improvements:

  • Fixes cross-platform test compatibility (Windows)
  • Corrects Schematron role attribute casing
  • Improves test expression ordering and diagnostic generation

Impact:
Enables compile-time type safety by distinguishing scalars from sequences, preventing type mismatches in EFX expressions. Provides foundation for generating validation artifacts from EFX Rules definitions.

…FO-4808)

Refactored expression model with separate scalar/sequence hierarchies. Introduced EfxTypeLattice for type variant management and TypeChecker interface for SDK-specific type validation. Updated translators to handle new expression model. Improved error reporting with ConsistencyCheckException for internal consistency checks. Enhanced symbol resolver for attribute fields. Added test coverage for sequence literals and context variables.
Copy link
Contributor

@bertrand-lorentz bertrand-lorentz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test coverage seems OK.
See my comment on a an incorrect or confusing code comment.

@bertrand-lorentz bertrand-lorentz merged commit 69000c5 into develop Feb 3, 2026
1 of 2 checks passed
@bertrand-lorentz bertrand-lorentz deleted the TEDEFO-4806-tighter-type-checking branch February 3, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants