Add Basic Ops from HEIR's mod_arith dialect #219
Merged
AlexanderViand merged 1 commit intomainfrom Mar 27, 2026
Merged
Conversation
4e5ecc7 to
35926d6
Compare
tobiasgrosser
added a commit
that referenced
this pull request
Feb 22, 2026
This PR only stablished syntax, but no semantics yet. It is pulled out of PR #219. We also increase the max recursion limit as the generation of the opcode inductive requires a deeper limit. Co-authored-by: Alexander Viand <AlexanderViand@gmail.com>
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Feb 23, 2026
This PR only stablished syntax, but no semantics yet. It is pulled out of PR #219. We also increase the max recursion limit as the generation of the opcode inductive requires a deeper limit. --------- Co-authored-by: Alexander Viand <AlexanderViand@gmail.com>
4dbce61 to
1f4f305
Compare
Collaborator
|
@AlexanderViand, I rebased this on the latest |
Contributor
Author
|
Thanks! I'd suggest we keep this as a draft for now and see if @math-fehr and I can't get this to a proper working-(ish) state during HACS/HACS Hack Day! |
4f1e020 to
5f5992e
Compare
5f5992e to
a9f99d6
Compare
mod_arith dialect mod_arith dialect
a9f99d6 to
1cc2370
Compare
ineol
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds basic syntax and parsing for HEIR's ModArith dialect designed to model modular arithmetic.
adds the
!mod_arith.int<...>type, which takes an Integer Attribute that specifies both the modulus and container type, e.g.,!mod_arith.int< 17 : i64>(or!mod_arith.int<17>, with the container type defaulting toi64).Adds
add,sub, andmulbinary ops andmod_arith.constantthat works analogously to arith.constant