Skip to content

fix: ensure scalar offsets are BIR access patterns#593

Open
govereau wants to merge 1 commit intomainfrom
pg/basic
Open

fix: ensure scalar offsets are BIR access patterns#593
govereau wants to merge 1 commit intomainfrom
pg/basic

Conversation

@govereau
Copy link
Collaborator

@govereau govereau commented Feb 6, 2026

When using an access as a scalar offset, it must be a BIR access pattern, otherwise it will be translated incorrectly down stream.

When using an access as a scalar offset, it must be a BIR
access pattern, otherwise it will be translated incorrectly
down stream.
let pattern := pattern.map fun (s,c) => Core.APPair.mk s c 0
let scalarOffset <- scalar_offset.mapM fun
| .inl a => pure (.acc a)
| .inl a => do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Keep in mind this triggers the bug in Walrus if we merge
I have a similar PR https://github.com/leanprover/KLR/pull/576/changes. Yours looks better

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, right. Thanks for pointing out.

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