diff --git a/cargo_klee_examples/examples/array.rs b/cargo_klee_examples/examples/array.rs index 9ec5e1001018328b5faced47a765caf80b610028..4222e144ca6e8869194a14910243566ded702846 100644 --- a/cargo_klee_examples/examples/array.rs +++ b/cargo_klee_examples/examples/array.rs @@ -37,7 +37,11 @@ fn main() { // Try to explain in your own words the difference and why? // (Hint, even if we don't use the result `b`, Rust do not optimize out the call, why?) // -// [your answer here] +// [There are 10 path with debug/dev mode and 2 path on release mode. +// In the debug mode/dev 8 of the paths is 8 for each loop, 1 path is for panic when index is out of range. +// The release mode is optimizing out all the loops, which means there are only two paths; one inside the loop +// and one outside. The b is not optimized out because the calculation of b can have side effects and +// code with side effects are not optimized out.] // // B) Fix the code so that you don't get an error. // (It should still compute the sum of the n first elements