-
Notifications
You must be signed in to change notification settings - Fork 23
Adding support for Machine Integer version of Bytes, List, and MInt functions #1209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
df2492b
Implementing `hook_MINT_powMint` codegen with support to MInt{256} an…
Robertorosmaninho 64d46c5
Implementing `hook_MINT_MInt2Bytes` codegen with support to MInt{256}
Robertorosmaninho 813f91d
Implementing `hook_MINT_Bytes2MInt` codegen with support to MInt{256}
Robertorosmaninho 8229b1a
Implementing `hook_BYTES_lengthMInt` codegen with support to MInt{256…
Robertorosmaninho 7797ded
Implementing `hook_BYTES_padRightMInt` codegen with support to MInt{2…
Robertorosmaninho 0e0b832
Implementing `hook_BYTES_padLeftMInt` codegen with support to MInt{25…
Robertorosmaninho 788febe
Implementing `hook_BYTES_replaceAtMInt` codegen with support to MInt{…
Robertorosmaninho 3e5b1e5
Implementing `hook_BYTES_substrMInt` codegen with support to MInt{256…
Robertorosmaninho 6535b5c
Implementing `hook_BYTES_getMInt` codegen with support to MInt{256} a…
Robertorosmaninho 5178cce
Implementing `hook_BYTES_updateMInt` codegen with support to MInt{256…
Robertorosmaninho 3669211
Implementing `hook_LIST_sizeMInt` codegen with support to MInt{256} a…
Robertorosmaninho 5d7dd50
Implementing `hook_LIST_getMInt` codegen with support to MInt{64}
Robertorosmaninho d7efaf7
Implementing `hook_LIST_updateMInt` in bytes.cpp for supporting MInt{…
Robertorosmaninho d8749dc
Fixing typo
Robertorosmaninho 8bc0a9b
Using `hook_BYTES_length64` instead of hardcoded `LENGTH_MASK`
Robertorosmaninho 60c6c99
Reusing error functions to emit messages on Int hooks as well
Robertorosmaninho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module LENGTHBYTES | ||
|
||
imports INT | ||
imports MINT | ||
imports BYTES | ||
imports BOOL | ||
imports K-EQUAL | ||
|
||
syntax MInt{64} | ||
syntax MInt{256} | ||
|
||
syntax Bytes ::= "bytesString" [macro] | ||
rule bytesString => | ||
b"\x1d)0\xdd\xcc#\xeb\x14)Q\x8bAG\xcf\xd46\xa7\xdb\x8f\xc6&\xc1=N\xb6\xa4\x81%\xc2\xd2\xf4o" | ||
|
||
syntax Bool ::= "testLengthBytes" [function] | ||
rule testLengthBytes => | ||
lengthBytes(bytesString):Int ==Int MInt2Unsigned(lengthBytes(bytesString):MInt{64}) andBool | ||
lengthBytes(bytesString):Int ==Int MInt2Unsigned(lengthBytes(bytesString):MInt{256}) | ||
|
||
endmodule |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
LblinitGeneratedTopCell{}(Lbl'Unds'Map'Unds'{}(Lbl'Stop'Map{}(),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortKConfigVar{}, SortKItem{}}(\dv{SortKConfigVar{}}("$PGM")),inj{SortBool{}, SortKItem{}}(LbltestLengthBytes'Unds'LENGTHBYTES'Unds'Bool{}())))) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Lbl'-LT-'generatedTop'-GT-'{}(Lbl'-LT-'k'-GT-'{}(kseq{}(inj{SortBool{}, SortKItem{}}(\dv{SortBool{}}("true")),dotk{}())),Lbl'-LT-'generatedCounter'-GT-'{}(\dv{SortInt{}}("0"))) |
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.
Uh oh!
There was an error while loading. Please reload this page.