Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Fibonacci counter #8

Open
0xLucqs opened this issue Jan 17, 2023 · 2 comments
Open

Fibonacci counter #8

0xLucqs opened this issue Jan 17, 2023 · 2 comments

Comments

@0xLucqs
Copy link
Contributor

0xLucqs commented Jan 17, 2023

Description

Compile a sierra fib implementation that returns a counter + the result into an llvm IR file

fn fib(a: felt, b: felt, n: felt) -> (felt, felt) {
    match n {
        0 => (a, 0),
        _ => {
            let (v, count) = fib(b, a + b, n - 1);
            (v, count + 1)
        },
    }
}

Acceptance criteria

  • Shenlong should compile the sierra file into an LLVM IR file
  • The compiled fib should return the right value
@0xLucqs 0xLucqs converted this from a draft issue Jan 17, 2023
@github-actions
Copy link

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍
Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions bot added the stale label Feb 17, 2023
@edg-l
Copy link
Collaborator

edg-l commented Feb 22, 2023

Working on getting this working, fixing the bug #36 helped (i found it trying to do this), but there is now another bug with the return value being the wrong type.

@github-actions github-actions bot removed the stale label Feb 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants