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

converted registers to relocatable cells and bug fixes #66

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AntoineFONDEUR
Copy link
Collaborator

converted registers to relocatable cells and bug fixes

Time spent on this PR: 2 hours

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Currently, registers are seen as felts which poses problem to relocate (since we need to add a +1 offset to all addresses for relocatables).

What is the new behavior?

Now all registers are considered as relocatables (=cells in google sheets).

This implied to change certain formulas for addition in GS (hence the enhancement of the segment element addition functions which are also now more reliable as they can work with columns like "AA" and cells like "Program!AD32").

The VM works fine with signed integers everywhere except for builtins for which the output is different depending on wether the inputs are signed or not. So builtin inputs are internally converted to unsigned ints (as felts would be >0 and <PRIME) and the ouputs are converted to signed ints since the rest of the VM works with signed ints. Like so assert_eqs between instructions and builtin outputs don't fail.

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.

1 participant