lambdaclass / concrete

Concrete is a simple programming language specifically crafted for creating highly scalable systems that are reliable, efficient, and easy to maintain.
Apache License 2.0
123 stars 11 forks source link

add function call type checks #122

Closed edg-l closed 4 months ago

edg-l commented 4 months ago

Checks the parameters are of the correct type:

mod Test {
    fn main() -> i32 {
        let x: u32 = 1;
        return hello(x);
    }

    fn hello(a: i32) -> i32 {
        return a * 2;
    }
}

Checks the parameter count matches:

mod Test {
    fn main() -> i32 {
        return hello(1, 2);
    }

    fn hello(a: i32) -> i32 {
        return a * 2;
    }
}
github-actions[bot] commented 4 months ago

Benchmarking factorial

Compiling factorial (factorial.con) Finished release in 29.597938ms Running 5000000 iterations Using input value: 20 Concrete Result = 2432902008176640000 Time taken : 62.08 ms Rust Result = 2432902008176640000 Time taken : 61.99 ms

Benchmarking fib

Compiling fib (fib.con) Finished release in 25.853483ms Running 5000 iterations Using input value: 20 Concrete Result = 6765 Time taken : 135.97 ms Rust Result = 6765 Time taken : 85.25 ms

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 40.81633% with 29 lines in your changes are missing coverage. Please review.

Project coverage is 61.61%. Comparing base (27904dc) to head (5644d2f).

Files Patch % Lines
crates/concrete_check/src/lib.rs 0.00% 29 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #122 +/- ## ========================================== - Coverage 61.63% 61.61% -0.02% ========================================== Files 25 25 Lines 4329 4364 +35 ========================================== + Hits 2668 2689 +21 - Misses 1661 1675 +14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.