Skip to content

Aligning implementation/specification error codes - phase 5 - #1994

Open
Roman-Manevich wants to merge 5 commits into
masterfrom
asl-error-codes-phase-5
Open

Aligning implementation/specification error codes - phase 5#1994
Roman-Manevich wants to merge 5 commits into
masterfrom
asl-error-codes-phase-5

Conversation

@Roman-Manevich

@Roman-Manevich Roman-Manevich commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Clarify empty integer constraints

Removed a stale TODO: ASL syntax and asl.spec require well-constrained integers to contain at least one constraint, so the implementation's empty case is an uncoded internal invariant.

Align reserved-identifier errors

Reserved identifiers now produce BE_RI in the lexical formalism, matching the implementation.

Classify invalid runtime slices

Runtime slices with a negative start or length now produce DE_BI, matching asl.spec; static slice failures remain TE_BS and use reason-specific bad_slices cases.

@Roman-Manevich
Roman-Manevich marked this pull request as ready for review September 6, 2026 20:20
Comment thread asllib/error.ml Outdated
@Roman-Manevich
Roman-Manevich force-pushed the asl-error-codes-phase-5 branch from 75157b6 to e10c57c Compare September 7, 2026 09:12
Comment thread asllib/error.ml
Comment thread asllib/tests/ASLTypingReference.t/run.t Outdated
[5+:0] data
};
ASL Static error (TE_BS):
Slice 5+:0 has length 0; slice lengths must be at least 1.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I realise this is a bit misleading - it's not the case that all slices must have length of at least one (we have zero-width slices). Please could we clarify this error message to explicitly restrict the cases in which a slice length must be at least 1? I believe this is in bitfields and on left-hand sides, but please confirm.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Right, this is indeed for both bitfields and left hand slide slices. Perhaps
"Slice %a has length %d; but the length of this slice must be at least 1." is clearer?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sounds good to me

@HadrienRenaud HadrienRenaud left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, please wait resolution on Hrutvik's side before merging

@Roman-Manevich
Roman-Manevich force-pushed the asl-error-codes-phase-5 branch from 7cceb6e to 5ad9244 Compare September 8, 2026 18:45
@Roman-Manevich
Roman-Manevich force-pushed the asl-error-codes-phase-5 branch from 5ad9244 to a16e206 Compare September 9, 2026 17:42
Base automatically changed from asl-error-codes-phase-4 to master September 10, 2026 11:45
@Roman-Manevich
Roman-Manevich force-pushed the asl-error-codes-phase-5 branch 2 times, most recently from efc90d2 to 88dfe32 Compare September 10, 2026 15:38
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.

3 participants