-
Notifications
You must be signed in to change notification settings - Fork 479
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
Bitwise operations #6090
Merged
Merged
Bitwise operations #6090
Changes from 14 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
02ab54f
Initial bitwise primitives
kozross 1a1ce70
Wire up new builtins
kozross 0c32b48
Merge branch 'master' into koz/bitwise-2
kozross 3556946
Tests
kozross 249489a
Changelogs
kozross ad5cc7b
Fix failing goldens
kozross f51656e
Merge branch 'master' into koz/bitwise-2
kozross 9520bc3
Fix cost model for tests
kozross aa5f83d
Bitwise primitives are not in Conway
kozross 56e90ad
Merge branch 'master' into koz/bitwise-2
kozross a01acc0
Finish shift tests
kozross 2fc1e8d
Fix goldens
kozross d23d03b
Rest of tests
kozross 7d6ba9c
Merge branch 'master' into koz/bitwise-2
kozross 30a7435
Merge branch 'master' into koz/bitwise-2
kozross 50b9171
Rename operations
kozross 2d73e9a
Note about split composition for shift property
kozross 6ef45c0
Explain bitwise tests in comments, remove AND and OR tests for findin…
kozross c25541f
Goldens for bitwise primops
kozross 6a6ee69
Chop down property test running times a bit
kozross cf668f4
Add test for finding first in zero byte string, rename some tests for…
kozross 4f550df
Clarify implementation choices in the comments
kozross 96d42bf
Tidy up helpers for property tests
kozross 4a71fc5
Consolidate all bitwise ops, retarget links to CIPs
kozross 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
41 changes: 41 additions & 0 deletions
41
plutus-core/changelog.d/20240523_124004_koz.ross_bitwise_2.md
This file contains 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,41 @@ | ||
<!-- | ||
A new scriv changelog fragment. | ||
|
||
Uncomment the section that is right (remove the HTML comment wrapper). | ||
--> | ||
|
||
<!-- | ||
### Removed | ||
|
||
- A bullet item for the Removed category. | ||
|
||
--> | ||
### Added | ||
|
||
- Implementation and tests for primitive operations in [this | ||
CIP](https://github.com/mlabs-haskell/CIPs/blob/koz/bitwise/CIP-XXXX/CIP-XXXX.md) | ||
|
||
<!-- | ||
### Changed | ||
|
||
- A bullet item for the Changed category. | ||
|
||
--> | ||
<!-- | ||
### Deprecated | ||
|
||
- A bullet item for the Deprecated category. | ||
|
||
--> | ||
<!-- | ||
### Fixed | ||
|
||
- A bullet item for the Fixed category. | ||
|
||
--> | ||
<!-- | ||
### Security | ||
|
||
- A bullet item for the Security category. | ||
|
||
--> |
This file contains 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
510 changes: 510 additions & 0 deletions
510
plutus-core/plutus-core/src/PlutusCore/Bitwise/Other.hs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the comments just about outnumber the lines of actual code in this file. That's a good thing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With code this fiddly (and this unfamiliar to many Haskellers, I am sure), that density of comments is important.