-
Notifications
You must be signed in to change notification settings - Fork 160
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
Unexpected values using get_integer_from_var_name
#1897
Comments
Hi there! |
Hey @FrancoGiachetta! Thanks 💪 The main issue regarding the cairo code is that it belongs to the OS and we cannot change that. I think that it must be related to ExpressionSimplifier: |
Oh I see. Thanks a lot for the links. I'll notify you as soon as I have any upgrades. |
Reading the comment again, I wanted to clarify something just in case. My first comment is just giving an intuition of the problem, perhaps is not the case. We currently taking a look into it to find a solution. |
Hi there! |
Hi! |
I'll close this issue as it was solved in the last main version. |
Describe the bug
There appears to be an issue in Cairo-vm when accessing certain variables. The behavior and returned values differ depending on whether the variables are defined using
let
orlocal
.Check that if you define
a
withlocal
instead oflet
, the hint prints the expected value. As far as I checked, in this case where the expression involves a subtraction, the result instead produces the sum of both terms.If
tmp
is defined withlet
, once again, we get the expected result.Using the
custom_hint
example, I made a small modification to define a as an expression containing a variable defined withlocal
. This change results in an incorrect output when attempting to read the variable.Current output:
To Reproduce
Steps to reproduce the behavior:
1 - Clone this branch: https://github.com/Moonsong-Labs/cairo-vm/tree/ft/get_integer_issue
2 - cd examples/custom_hint/
3- make example
Expected output
The text was updated successfully, but these errors were encountered: