Skip to content

Implemented an experimental type checker - #122

Open
mlaveaux wants to merge 94 commits into
MERCorg:mainfrom
mlaveaux:feature/typecheck
Open

Implemented an experimental type checker#122
mlaveaux wants to merge 94 commits into
MERCorg:mainfrom
mlaveaux:feature/typecheck

Conversation

@mlaveaux

Copy link
Copy Markdown
Collaborator

This is a continuation of the previous type checker that only performed some minor well typedness checks. These have been extended, and additional passes for the type checking using unification and lowering to aterms have been implemented.

mlaveaux added 30 commits July 18, 2026 15:15
…and rejecting conflicting ones; add tests for new behavior.
Copilot AI review requested due to automatic review settings July 21, 2026 16:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

mlaveaux added 14 commits July 24, 2026 13:00
MatchGoal::partition previously handed back each partition's
announcement positions, and derive_transition used those to decide
whether a freshly discovered subtree position should merge into an
existing partition. pos_comparable treats an empty position as
comparable to anything, and root-anchored goals have an empty
announcement position, so any partition containing one absorbed every
subsequent fresh subtree without bound and the automaton construction
never reached a fixpoint.

Goals reaching this code are always unchanged/reduced (never
completed), so their obligations are never empty even when the
announcement position is. Deriving the merge-candidate positions from
each partition's remaining obligations instead of its announcement
positions keeps merging tied to genuinely overlapping work and
restores termination.
- Introduced `SystemEquationGroup` to encapsulate generated content and its equation range.
- Modified `build_system_defined_specification` and `extend_system_with_inferred_sorts` to return both the merged specification and the associated `SystemEquationGroup`s.
- Enhanced `resolve_system_signature_full` to resolve declarations by groups, ensuring proper handling of constructors and mappings.
- Updated `validate_system_binder_sorts` to recursively resolve sorts for binder variables in equations.
- Added tests to verify the correctness of signature resolution and ensure that equations are validated against their respective binder sorts.
Copilot AI review requested due to automatic review settings August 5, 2026 08:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants