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

Invastigate issues with complex_calculator test #45

Open
ksew1 opened this issue Sep 2, 2024 · 1 comment
Open

Invastigate issues with complex_calculator test #45

ksew1 opened this issue Sep 2, 2024 · 1 comment
Assignees
Labels
blocked Blocked by other issue bug Something isn't working cairo-coverage Should be done in cairo-coverage Compiler Should be done in cairo compiler

Comments

@ksew1
Copy link
Member

ksew1 commented Sep 2, 2024

When executing coverage analysis on the complex_calculator project, two primary issues have been identified:

  1. Function Declaration Hitability:

    • Problem: Inconsistent marking of function declarations as hittable/non-hittable.

      • Examples (Hittable): divide, factorial, power, fibonacci, is_prime
      • Examples (Non-hittable): add, subtract, multiply, unsafe_divide
    • Expected Behavior: Function declarations should consistently be marked as non-hittable, as they do not represent executable lines of code.

      Suspicions: All not hittable declarations are one line functions

  2. Result Assignment Coverage in is_prime:

    • Problem: The declaration and assignment of the result variable in the is_prime function are incorrectly marked as hittable, and worse, the assignment is marked as not hit despite it being executed.

    • Expected Behavior: Result declaration and assignment should be non hittable

      Suspicions: result variable is declared as mut

@ksew1 ksew1 added bug Something isn't working cairo-coverage Should be done in cairo-coverage Compiler Should be done in cairo compiler labels Sep 2, 2024
@cptartur cptartur added the blocked Blocked by other issue label Sep 23, 2024
@ksew1
Copy link
Member Author

ksew1 commented Sep 30, 2024

  1. Sometimes compiler produces enum_init<core::bool, > which is never executed by vm. Compiler team says this is working as expected. So probably we should mark instructions like enum_init<core::bool, > not executable.

@ksew1 ksew1 self-assigned this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by other issue bug Something isn't working cairo-coverage Should be done in cairo-coverage Compiler Should be done in cairo compiler
Projects
None yet
Development

No branches or pull requests

2 participants