Comments (3)
Removing the line that modifies the slice from inside the loop results in a different crash:
fn zero_slice(a: &mut [u8]) {
let mut i: usize = 0;
let len = a.len();
while i < len {
i = i + 1;
}
}
$ charon
Compiling array_zero v0.1.0 (/home/ubuntu/examples/aeneas/array_zero)
[ INFO charon_driver::export:106] [gexport]: Generated the file: /home/ubuntu/examples/aeneas/array_zero/array_zero.llbc
Finished release [optimized] target(s) in 0.17s
$ aeneas -backend lean array_zero.llbc
[Info ] Imported: array_zero.llbc
Uncaught exception:
(Failure Unexpected)
Raised at Aeneas__InterpreterLoopsFixedPoint.compute_loop_entry_fixed_point.(fun) in file "InterpreterLoopsFixedPoint.ml", line 612, characters 14-42
Called from Stdlib__Map.Make.iter in file "map.ml", line 297, characters 20-25
Called from Aeneas__InterpreterLoopsFixedPoint.compute_loop_entry_fixed_point in file "InterpreterLoopsFixedPoint.ml", line 601, characters 6-1023
Called from Aeneas__InterpreterLoops.eval_loop_symbolic in file "InterpreterLoops.ml", line 76, characters 4-68
Called from Aeneas__InterpreterLoopsFixedPoint.prepare_ashared_loans in file "InterpreterLoopsFixedPoint.ml", line 306, characters 8-14
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterPaths.end_loans_at_place in file "InterpreterPaths.ml", line 558, characters 4-10
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterStatements.eval_function_call_symbolic_from_inst_sig.cf_call in file "InterpreterStatements.ml", line 1403, characters 15-21
Called from Aeneas__InterpreterPaths.end_loans_at_place in file "InterpreterPaths.ml", line 558, characters 4-10
Called from Aeneas__InterpreterStatements.eval_transparent_function_call_symbolic in file "InterpreterStatements.ml", line 1307, characters 2-161
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterStatements.eval_statement.cf_eval_st.cf_assign in file "InterpreterStatements.ml", line 955, characters 29-70
Called from Aeneas__InterpreterPaths.end_loans_at_place in file "InterpreterPaths.ml", line 558, characters 4-10
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterPaths.end_loans_at_place in file "InterpreterPaths.ml", line 558, characters 4-10
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterStatements.eval_statement.cf_eval_st.cf_assign in file "InterpreterStatements.ml", line 955, characters 29-70
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterExpansion.greedy_expand_symbolics_with_borrows.expand in file "InterpreterExpansion.ml", line 646, characters 6-12
Called from Aeneas__InterpreterExpansion.expand_symbolic_value_borrow in file "InterpreterExpansion.ml", line 419, characters 17-23
Called from Aeneas__Interpreter.evaluate_function_symbolic in file "Interpreter.ml", line 589, characters 4-71
Called from Aeneas__Translate.translate_function_to_symbolics in file "Translate.ml", line 35, characters 25-77
Called from Aeneas__Translate.translate_function_to_pure in file "Translate.ml", line 55, characters 23-69
Called from Stdlib__List.map in file "list.ml", line 92, characters 20-23
Called from Aeneas__Translate.translate_crate_to_pure in file "Translate.ml", line 298, characters 4-127
Called from Aeneas__Translate.translate_crate in file "Translate.ml", line 992, characters 4-33
Called from Dune__exe__Main in file "Main.ml", line 279, characters 6-58
from aeneas.
Thanks for the bug report, I will look into it as soon as possible.
from aeneas.
Fixed by #85
from aeneas.
Related Issues (20)
- '... and assignment' operators cause an error on arrays.
- Test crates fail to build in CI HOT 1
- `make setup-charon` can fail when the OID doesn't exist in Charon HOT 3
- Improve `scalar_tac`
- Improve `scalar_eq_nf`
- Implement more powerful context simplification tactics
- Implement a saturation tactic to handle universally quantified assumptions
- Implement a congruence closure tactic
- `progress*`
- Use `Nat` and `Int` instead of `Usize` and `Isize`
- Setup Loogle so that we can search for theorems inside the Lean library developed for Aeneas
- Fix the loops of `simp_all` in `scalar_tac`
- Tuple decomposition doesn't work well in the Lean backend
- Improve the `progress` tactic
- Give the possibility of extracting the source code as comments
- Unfolding an extraction can lead to a weird term with `Diverge.FixII.…`
- Rename `assumed` to `builtin`
- Turn the ICFP tutorial into a Lean game HOT 3
- Minimize the parameters of globals/constants
- Make the backward functions not fail
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aeneas.