Skip to content
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

refactor: uint module #75

Merged
merged 55 commits into from
Jun 28, 2024
Merged

refactor: uint module #75

merged 55 commits into from
Jun 28, 2024

Conversation

iammadab
Copy link
Contributor

General Goals

  • make logic clearer via abstractions and documentation
  • all methods should be under UInt<M, C>::* (remove UIntAddSub and UIntCmp)
  • extensive testing

singer-pro/src/basic_block/bb_final.rs Outdated Show resolved Hide resolved
singer-utils/src/uint.rs Outdated Show resolved Hide resolved
singer-utils/src/uint/uint.rs Outdated Show resolved Hide resolved
singer-utils/src/chips/bytecode.rs Outdated Show resolved Hide resolved
@iammadab iammadab requested a review from dreamATD June 18, 2024 10:07
singer-utils/src/uint/arithmetic.rs Outdated Show resolved Hide resolved
singer-utils/src/uint/arithmetic.rs Outdated Show resolved Hide resolved
singer-utils/src/uint/constants.rs Outdated Show resolved Hide resolved
singer-utils/src/uint/constants.rs Show resolved Hide resolved
singer-utils/src/uint/witness_extractors.rs Outdated Show resolved Hide resolved
singer-utils/src/uint/constants.rs Outdated Show resolved Hide resolved
@dreamATD dreamATD merged commit 8ca70a9 into master Jun 28, 2024
2 of 4 checks passed
dreamATD added a commit that referenced this pull request Jun 28, 2024
iammadab added a commit that referenced this pull request Jul 1, 2024
dreamATD pushed a commit that referenced this pull request Jul 1, 2024
yczhangsjtu pushed a commit that referenced this pull request Aug 12, 2024
* confirm const across file impl

* implement try from cell_id's to uint

* add test for uint from cell ids

* add documentation

* document N_OPERAND_CELLS constant

* wip

* test cell repacking

* add documentation

* update packing test, ensure remaining values are 0s

* add more uint instantiation methods

* add test placeholders

* sketch base plan for cmp

* implement and test pad cells

* modify from_range and from_bytes to use cell padding

* extract logic for uint from arbitrary cell_width to make from_range and from_bytes easier

* add compile time evaluated min function

* introduce new constant  cleans up uint_from*

* update uint from cell id test to test greater than N_OPERANDS

* add test for uint from different sized cells

* implement add_unsafe

* add functions sketch

* wip

* all func

* building

* test compiling

* use range checker

* refactor constants second pass

* document cmp

* wip

* arithmetic second pass

* delete old uint

* refactor arithmetic

* fix documentation

* add test for add

* test add constant unsafe

* add test for add_small_unsafe

* implement handle borrow

* test sub_unsafe

* rename add_small to add_cell

* wip

* change uint mod management

* setup structure for namespacing constants

* refactor counter vector implementation

* move add specific constants to AddSub block

* fix comment arithmetic precedence

* wip

* use range cells instead of range cells no overflow

* add optimization comment

* wip

* rename witness extractors
yczhangsjtu pushed a commit that referenced this pull request Aug 12, 2024
hero78119 pushed a commit that referenced this pull request Sep 30, 2024
* confirm const across file impl

* implement try from cell_id's to uint

* add test for uint from cell ids

* add documentation

* document N_OPERAND_CELLS constant

* wip

* test cell repacking

* add documentation

* update packing test, ensure remaining values are 0s

* add more uint instantiation methods

* add test placeholders

* sketch base plan for cmp

* implement and test pad cells

* modify from_range and from_bytes to use cell padding

* extract logic for uint from arbitrary cell_width to make from_range and from_bytes easier

* add compile time evaluated min function

* introduce new constant  cleans up uint_from*

* update uint from cell id test to test greater than N_OPERANDS

* add test for uint from different sized cells

* implement add_unsafe

* add functions sketch

* wip

* all func

* building

* test compiling

* use range checker

* refactor constants second pass

* document cmp

* wip

* arithmetic second pass

* delete old uint

* refactor arithmetic

* fix documentation

* add test for add

* test add constant unsafe

* add test for add_small_unsafe

* implement handle borrow

* test sub_unsafe

* rename add_small to add_cell

* wip

* change uint mod management

* setup structure for namespacing constants

* refactor counter vector implementation

* move add specific constants to AddSub block

* fix comment arithmetic precedence

* wip

* use range cells instead of range cells no overflow

* add optimization comment

* wip

* rename witness extractors
hero78119 pushed a commit that referenced this pull request Sep 30, 2024
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