software-mansion / software-mansion/cairo-debugger

Handle zero-Sierra variables

Open
#130 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
7
Forks
2
Avg merge
5d 2h
Merged PRs (30d)
1

Description

Sometimes, especially in simple functions, we have assignments that produce no Sierra statements. For example, the function:

fn foo(x: felt252) -> felt252 {
    let y = x;
    0 
}

has Sierra:

f1:
drop<felt252>([0]);
const_as_immediate<felt252, 0>() -> [1];
return([1]);

the binding is not hittable and y does not exist in Sierra, which makes y impossible to show

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the zero-Sierra-statement foo example and trace how its Cairo binding is mapped to debugger-visible Sierra variables. The work is done when y can be shown despite producing no Sierra statements; no source file or test is named in the issue, so locating the relevant mapping code is part of the investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.