diff options
author | Guillaume Boisseau | 2024-06-18 13:49:43 +0200 |
---|---|---|
committer | GitHub | 2024-06-18 13:49:43 +0200 |
commit | 370f2668f0a36fb31ed9abb4ba613dad333cf406 (patch) | |
tree | d1a6549cdd2f8e20366b8a5feaa1550fc10fe783 | |
parent | 43a9fb0fa5a1c03a7cce575a052f0d4201189d1d (diff) | |
parent | 926eb538cc35cf9a818a6905ff4ce58eeb3db9c4 (diff) |
Merge pull request #251 from Nadrieril/bump-charon2
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/ci.yml | 16 | ||||
-rw-r--r-- | charon-pin | 2 | ||||
-rw-r--r-- | compiler/Errors.ml | 5 | ||||
-rw-r--r-- | compiler/ExtractTypes.ml | 11 | ||||
-rw-r--r-- | flake.lock | 6 | ||||
-rw-r--r-- | tests/coq/arrays/Arrays.v | 10 | ||||
-rw-r--r-- | tests/coq/betree/Betree_Funs.v | 8 | ||||
-rw-r--r-- | tests/coq/hashmap/Hashmap_Funs.v | 2 | ||||
-rw-r--r-- | tests/coq/misc/Loops.v | 10 | ||||
-rw-r--r-- | tests/fstar/arrays/Arrays.Clauses.Template.fst | 10 | ||||
-rw-r--r-- | tests/fstar/arrays/Arrays.Funs.fst | 10 | ||||
-rw-r--r-- | tests/fstar/betree/Betree.Clauses.Template.fst | 8 | ||||
-rw-r--r-- | tests/fstar/betree/Betree.Funs.fst | 8 | ||||
-rw-r--r-- | tests/fstar/hashmap/Hashmap.Clauses.Template.fst | 2 | ||||
-rw-r--r-- | tests/fstar/hashmap/Hashmap.Funs.fst | 2 | ||||
-rw-r--r-- | tests/fstar/misc/Loops.Clauses.Template.fst | 10 | ||||
-rw-r--r-- | tests/fstar/misc/Loops.Funs.fst | 10 | ||||
-rw-r--r-- | tests/lean/Arrays.lean | 10 | ||||
-rw-r--r-- | tests/lean/Betree/Funs.lean | 8 | ||||
-rw-r--r-- | tests/lean/Hashmap/Funs.lean | 2 | ||||
-rw-r--r-- | tests/lean/Loops.lean | 10 | ||||
-rw-r--r-- | tests/src/mutually-recursive-traits.lean.out | 2 |
22 files changed, 73 insertions, 89 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e66e5753..17ed0f26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,8 @@ permissions: jobs: # Avoid `push` and `pull_request` running the same job twice check_if_skip_duplicate_job: - # runs-on: [self-hosted, linux, nix] - runs-on: ubuntu-latest + runs-on: [self-hosted, linux, nix] steps: - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - id: skip_check uses: fkirc/skip-duplicate-actions@v5 with: @@ -33,13 +30,11 @@ jobs: should_skip: ${{ steps.skip_check.outputs.should_skip }} nix: - # runs-on: [self-hosted, linux, nix] - runs-on: ubuntu-latest + #runs-on: ubuntu-latest + runs-on: [self-hosted, linux, nix] needs: check_if_skip_duplicate_job if: needs.check_if_skip_duplicate_job.outputs.should_skip != 'true' steps: - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - uses: actions/checkout@v4 - run: nix build -L .#checks.x86_64-linux.aeneas-check-tidiness - run: nix build -L .#checks.x86_64-linux.check-charon-pin @@ -61,11 +56,8 @@ jobs: - run: nix develop --command bash -c "cd tests/lean && make" check-charon-pin: - # runs-on: [self-hosted, linux, nix] - runs-on: ubuntu-latest + runs-on: [self-hosted, linux, nix] steps: - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - uses: actions/checkout@v4 with: fetch-depth: 0 # deep clone in order to get access to other commits @@ -1,2 +1,2 @@ # This is the commit from https://github.com/AeneasVerif/charon that should be used with this version of aeneas. -f818fc0c4f380b0140be077308f354cfd89c2d7f +a350f1e4795d57fb7b23c4c2d24003cf5e16315f diff --git a/compiler/Errors.ml b/compiler/Errors.ml index 6e2de7e1..838e1e37 100644 --- a/compiler/Errors.ml +++ b/compiler/Errors.ml @@ -1,7 +1,6 @@ let log = Logging.errors_log -let span_to_string (span : Meta.span) = - let raw_span = span.span in +let raw_span_to_string (raw_span : Meta.raw_span) = let file = match raw_span.file with Virtual s | Local s -> s in let loc_to_string (l : Meta.loc) : string = string_of_int l.line ^ ":" ^ string_of_int l.col @@ -11,6 +10,8 @@ let span_to_string (span : Meta.span) = ^ "-" ^ loc_to_string raw_span.end_loc +let span_to_string (span : Meta.span) = raw_span_to_string span.span + let format_error_message (span : Meta.span option) (msg : string) = let span = match span with None -> "" | Some span -> "\n" ^ span_to_string span diff --git a/compiler/ExtractTypes.ml b/compiler/ExtractTypes.ml index 631db13e..edd9d58e 100644 --- a/compiler/ExtractTypes.ml +++ b/compiler/ExtractTypes.ml @@ -1162,16 +1162,7 @@ let extract_comment_with_raw_span (ctx : extraction_ctx) (fmt : F.formatter) (sl : string list) (name : Types.name option) ?(generics : (Types.generic_params * Types.generic_args) option = None) (raw_span : Meta.raw_span) : unit = - let file = match raw_span.file with Virtual s | Local s -> s in - let loc_to_string (l : Meta.loc) : string = - string_of_int l.line ^ ":" ^ string_of_int l.col - in - let raw_span = - "Source: '" ^ file ^ "', lines " - ^ loc_to_string raw_span.beg_loc - ^ "-" - ^ loc_to_string raw_span.end_loc - in + let raw_span = raw_span_to_string raw_span in let name = match (name, generics) with | None, _ -> [] @@ -9,11 +9,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1718628521, - "narHash": "sha256-RskPLip2zGm96bw6Qpu0teff3RMKGVDfGxIdj5vFz7w=", + "lastModified": 1718705446, + "narHash": "sha256-1IAwhNbHkgtZRgkq9Fq+E5yOuszhTPO2J/88gyyg7jQ=", "owner": "aeneasverif", "repo": "charon", - "rev": "f818fc0c4f380b0140be077308f354cfd89c2d7f", + "rev": "a350f1e4795d57fb7b23c4c2d24003cf5e16315f", "type": "github" }, "original": { diff --git a/tests/coq/arrays/Arrays.v b/tests/coq/arrays/Arrays.v index 5ff17341..cd6a4b87 100644 --- a/tests/coq/arrays/Arrays.v +++ b/tests/coq/arrays/Arrays.v @@ -376,7 +376,7 @@ Definition non_copyable_array : result unit := . (** [arrays::sum]: loop 0: - Source: 'tests/src/arrays.rs', lines 245:0-253:1 *) + Source: 'tests/src/arrays.rs', lines 247:4-253:1 *) Fixpoint sum_loop (n : nat) (s : slice u32) (sum1 : u32) (i : usize) : result u32 := match n with @@ -400,7 +400,7 @@ Definition sum (n : nat) (s : slice u32) : result u32 := . (** [arrays::sum2]: loop 0: - Source: 'tests/src/arrays.rs', lines 255:0-264:1 *) + Source: 'tests/src/arrays.rs', lines 258:4-264:1 *) Fixpoint sum2_loop (n : nat) (s : slice u32) (s2 : slice u32) (sum1 : u32) (i : usize) : result u32 @@ -508,7 +508,7 @@ Definition ite : result unit := . (** [arrays::zero_slice]: loop 0: - Source: 'tests/src/arrays.rs', lines 306:0-313:1 *) + Source: 'tests/src/arrays.rs', lines 308:4-313:1 *) Fixpoint zero_slice_loop (n : nat) (a : slice u8) (i : usize) (len : usize) : result (slice u8) := match n with @@ -532,7 +532,7 @@ Definition zero_slice (n : nat) (a : slice u8) : result (slice u8) := . (** [arrays::iter_mut_slice]: loop 0: - Source: 'tests/src/arrays.rs', lines 315:0-321:1 *) + Source: 'tests/src/arrays.rs', lines 317:4-321:1 *) Fixpoint iter_mut_slice_loop (n : nat) (len : usize) (i : usize) : result unit := match n with @@ -551,7 +551,7 @@ Definition iter_mut_slice (n : nat) (a : slice u8) : result (slice u8) := . (** [arrays::sum_mut_slice]: loop 0: - Source: 'tests/src/arrays.rs', lines 323:0-331:1 *) + Source: 'tests/src/arrays.rs', lines 325:4-331:1 *) Fixpoint sum_mut_slice_loop (n : nat) (a : slice u32) (i : usize) (s : u32) : result u32 := match n with diff --git a/tests/coq/betree/Betree_Funs.v b/tests/coq/betree/Betree_Funs.v index 1c6092ba..bb9fe90e 100644 --- a/tests/coq/betree/Betree_Funs.v +++ b/tests/coq/betree/Betree_Funs.v @@ -89,7 +89,7 @@ Definition betree_upsert_update . (** [betree::betree::{betree::betree::List<T>#1}::len]: loop 0: - Source: 'src/betree.rs', lines 276:4-284:5 *) + Source: 'src/betree.rs', lines 278:8-284:5 *) Fixpoint betree_List_len_loop (T : Type) (n : nat) (self : betree_List_t T) (len : u64) : result u64 := match n with @@ -111,7 +111,7 @@ Definition betree_List_len . (** [betree::betree::{betree::betree::List<T>#1}::reverse]: loop 0: - Source: 'src/betree.rs', lines 304:4-312:5 *) + Source: 'src/betree.rs', lines 305:8-312:5 *) Fixpoint betree_List_reverse_loop (T : Type) (n : nat) (self : betree_List_t T) (out : betree_List_t T) : result (betree_List_t T) @@ -135,7 +135,7 @@ Definition betree_List_reverse . (** [betree::betree::{betree::betree::List<T>#1}::split_at]: loop 0: - Source: 'src/betree.rs', lines 287:4-302:5 *) + Source: 'src/betree.rs', lines 289:8-302:5 *) Fixpoint betree_List_split_at_loop (T : Type) (n : nat) (n1 : u64) (beg : betree_List_t T) (self : betree_List_t T) : @@ -204,7 +204,7 @@ Definition betree_ListPairU64T_head_has_key . (** [betree::betree::{betree::betree::List<(u64, T)>#2}::partition_at_pivot]: loop 0: - Source: 'src/betree.rs', lines 355:4-370:5 *) + Source: 'src/betree.rs', lines 358:8-370:5 *) Fixpoint betree_ListPairU64T_partition_at_pivot_loop (T : Type) (n : nat) (pivot : u64) (beg : betree_List_t (u64 * T)) (end1 : betree_List_t (u64 * T)) (self : betree_List_t (u64 * T)) : diff --git a/tests/coq/hashmap/Hashmap_Funs.v b/tests/coq/hashmap/Hashmap_Funs.v index d63c6f72..39bd5098 100644 --- a/tests/coq/hashmap/Hashmap_Funs.v +++ b/tests/coq/hashmap/Hashmap_Funs.v @@ -70,7 +70,7 @@ Definition hashMap_new (T : Type) (n : nat) : result (HashMap_t T) := . (** [hashmap::{hashmap::HashMap<T>}::clear]: loop 0: - Source: 'tests/src/hashmap.rs', lines 91:4-99:5 *) + Source: 'tests/src/hashmap.rs', lines 94:8-99:5 *) Fixpoint hashMap_clear_loop (T : Type) (n : nat) (slots : alloc_vec_Vec (AList_t T)) (i : usize) : result (alloc_vec_Vec (AList_t T)) diff --git a/tests/coq/misc/Loops.v b/tests/coq/misc/Loops.v index 87b05193..a29394e1 100644 --- a/tests/coq/misc/Loops.v +++ b/tests/coq/misc/Loops.v @@ -9,7 +9,7 @@ Local Open Scope Primitives_scope. Module Loops. (** [loops::sum]: loop 0: - Source: 'tests/src/loops.rs', lines 8:0-18:1 *) + Source: 'tests/src/loops.rs', lines 10:4-18:1 *) Fixpoint sum_loop (n : nat) (max : u32) (i : u32) (s : u32) : result u32 := match n with | O => Fail_ OutOfFuel @@ -27,7 +27,7 @@ Definition sum (n : nat) (max : u32) : result u32 := . (** [loops::sum_with_mut_borrows]: loop 0: - Source: 'tests/src/loops.rs', lines 23:0-35:1 *) + Source: 'tests/src/loops.rs', lines 25:4-35:1 *) Fixpoint sum_with_mut_borrows_loop (n : nat) (max : u32) (i : u32) (s : u32) : result u32 := match n with @@ -49,7 +49,7 @@ Definition sum_with_mut_borrows (n : nat) (max : u32) : result u32 := . (** [loops::sum_with_shared_borrows]: loop 0: - Source: 'tests/src/loops.rs', lines 38:0-52:1 *) + Source: 'tests/src/loops.rs', lines 40:4-52:1 *) Fixpoint sum_with_shared_borrows_loop (n : nat) (max : u32) (i : u32) (s : u32) : result u32 := match n with @@ -71,7 +71,7 @@ Definition sum_with_shared_borrows (n : nat) (max : u32) : result u32 := . (** [loops::sum_array]: loop 0: - Source: 'tests/src/loops.rs', lines 54:0-62:1 *) + Source: 'tests/src/loops.rs', lines 56:4-62:1 *) Fixpoint sum_array_loop (N : usize) (n : nat) (a : array u32 N) (i : usize) (s : u32) : result u32 := match n with @@ -94,7 +94,7 @@ Definition sum_array (N : usize) (n : nat) (a : array u32 N) : result u32 := . (** [loops::clear]: loop 0: - Source: 'tests/src/loops.rs', lines 66:0-72:1 *) + Source: 'tests/src/loops.rs', lines 67:4-72:1 *) Fixpoint clear_loop (n : nat) (v : alloc_vec_Vec u32) (i : usize) : result (alloc_vec_Vec u32) := match n with diff --git a/tests/fstar/arrays/Arrays.Clauses.Template.fst b/tests/fstar/arrays/Arrays.Clauses.Template.fst index 914ef44e..b5818ab6 100644 --- a/tests/fstar/arrays/Arrays.Clauses.Template.fst +++ b/tests/fstar/arrays/Arrays.Clauses.Template.fst @@ -7,31 +7,31 @@ open Arrays.Types #set-options "--z3rlimit 50 --fuel 1 --ifuel 1" (** [arrays::sum]: decreases clause - Source: 'tests/src/arrays.rs', lines 245:0-253:1 *) + Source: 'tests/src/arrays.rs', lines 247:4-253:1 *) unfold let sum_loop_decreases (s : slice u32) (sum1 : u32) (i : usize) : nat = admit () (** [arrays::sum2]: decreases clause - Source: 'tests/src/arrays.rs', lines 255:0-264:1 *) + Source: 'tests/src/arrays.rs', lines 258:4-264:1 *) unfold let sum2_loop_decreases (s : slice u32) (s2 : slice u32) (sum1 : u32) (i : usize) : nat = admit () (** [arrays::zero_slice]: decreases clause - Source: 'tests/src/arrays.rs', lines 306:0-313:1 *) + Source: 'tests/src/arrays.rs', lines 308:4-313:1 *) unfold let zero_slice_loop_decreases (a : slice u8) (i : usize) (len : usize) : nat = admit () (** [arrays::iter_mut_slice]: decreases clause - Source: 'tests/src/arrays.rs', lines 315:0-321:1 *) + Source: 'tests/src/arrays.rs', lines 317:4-321:1 *) unfold let iter_mut_slice_loop_decreases (len : usize) (i : usize) : nat = admit () (** [arrays::sum_mut_slice]: decreases clause - Source: 'tests/src/arrays.rs', lines 323:0-331:1 *) + Source: 'tests/src/arrays.rs', lines 325:4-331:1 *) unfold let sum_mut_slice_loop_decreases (a : slice u32) (i : usize) (s : u32) : nat = admit () diff --git a/tests/fstar/arrays/Arrays.Funs.fst b/tests/fstar/arrays/Arrays.Funs.fst index a4f2e19f..5aad99e0 100644 --- a/tests/fstar/arrays/Arrays.Funs.fst +++ b/tests/fstar/arrays/Arrays.Funs.fst @@ -307,7 +307,7 @@ let non_copyable_array : result unit = take_array_t (mk_array aB_t 2 [ AB_A; AB_B ]) (** [arrays::sum]: loop 0: - Source: 'tests/src/arrays.rs', lines 245:0-253:1 *) + Source: 'tests/src/arrays.rs', lines 247:4-253:1 *) let rec sum_loop (s : slice u32) (sum1 : u32) (i : usize) : Tot (result u32) (decreases (sum_loop_decreases s sum1 i)) @@ -327,7 +327,7 @@ let sum (s : slice u32) : result u32 = sum_loop s 0 0 (** [arrays::sum2]: loop 0: - Source: 'tests/src/arrays.rs', lines 255:0-264:1 *) + Source: 'tests/src/arrays.rs', lines 258:4-264:1 *) let rec sum2_loop (s : slice u32) (s2 : slice u32) (sum1 : u32) (i : usize) : Tot (result u32) (decreases (sum2_loop_decreases s s2 sum1 i)) @@ -415,7 +415,7 @@ let ite : result unit = Ok () (** [arrays::zero_slice]: loop 0: - Source: 'tests/src/arrays.rs', lines 306:0-313:1 *) + Source: 'tests/src/arrays.rs', lines 308:4-313:1 *) let rec zero_slice_loop (a : slice u8) (i : usize) (len : usize) : Tot (result (slice u8)) (decreases (zero_slice_loop_decreases a i len)) @@ -434,7 +434,7 @@ let zero_slice (a : slice u8) : result (slice u8) = let len = slice_len u8 a in zero_slice_loop a 0 len (** [arrays::iter_mut_slice]: loop 0: - Source: 'tests/src/arrays.rs', lines 315:0-321:1 *) + Source: 'tests/src/arrays.rs', lines 317:4-321:1 *) let rec iter_mut_slice_loop (len : usize) (i : usize) : Tot (result unit) (decreases (iter_mut_slice_loop_decreases len i)) @@ -449,7 +449,7 @@ let iter_mut_slice (a : slice u8) : result (slice u8) = let len = slice_len u8 a in let* _ = iter_mut_slice_loop len 0 in Ok a (** [arrays::sum_mut_slice]: loop 0: - Source: 'tests/src/arrays.rs', lines 323:0-331:1 *) + Source: 'tests/src/arrays.rs', lines 325:4-331:1 *) let rec sum_mut_slice_loop (a : slice u32) (i : usize) (s : u32) : Tot (result u32) (decreases (sum_mut_slice_loop_decreases a i s)) diff --git a/tests/fstar/betree/Betree.Clauses.Template.fst b/tests/fstar/betree/Betree.Clauses.Template.fst index d3e07c7e..dbbfae2b 100644 --- a/tests/fstar/betree/Betree.Clauses.Template.fst +++ b/tests/fstar/betree/Betree.Clauses.Template.fst @@ -7,28 +7,28 @@ open Betree.Types #set-options "--z3rlimit 50 --fuel 1 --ifuel 1" (** [betree::betree::{betree::betree::List<T>#1}::len]: decreases clause - Source: 'src/betree.rs', lines 276:4-284:5 *) + Source: 'src/betree.rs', lines 278:8-284:5 *) unfold let betree_List_len_loop_decreases (t : Type0) (self : betree_List_t t) (len : u64) : nat = admit () (** [betree::betree::{betree::betree::List<T>#1}::reverse]: decreases clause - Source: 'src/betree.rs', lines 304:4-312:5 *) + Source: 'src/betree.rs', lines 305:8-312:5 *) unfold let betree_List_reverse_loop_decreases (t : Type0) (self : betree_List_t t) (out : betree_List_t t) : nat = admit () (** [betree::betree::{betree::betree::List<T>#1}::split_at]: decreases clause - Source: 'src/betree.rs', lines 287:4-302:5 *) + Source: 'src/betree.rs', lines 289:8-302:5 *) unfold let betree_List_split_at_loop_decreases (t : Type0) (n : u64) (beg : betree_List_t t) (self : betree_List_t t) : nat = admit () (** [betree::betree::{betree::betree::List<(u64, T)>#2}::partition_at_pivot]: decreases clause - Source: 'src/betree.rs', lines 355:4-370:5 *) + Source: 'src/betree.rs', lines 358:8-370:5 *) unfold let betree_ListPairU64T_partition_at_pivot_loop_decreases (t : Type0) (pivot : u64) (beg : betree_List_t (u64 & t)) diff --git a/tests/fstar/betree/Betree.Funs.fst b/tests/fstar/betree/Betree.Funs.fst index de3ac13c..53356bdb 100644 --- a/tests/fstar/betree/Betree.Funs.fst +++ b/tests/fstar/betree/Betree.Funs.fst @@ -76,7 +76,7 @@ let betree_upsert_update end (** [betree::betree::{betree::betree::List<T>#1}::len]: loop 0: - Source: 'src/betree.rs', lines 276:4-284:5 *) + Source: 'src/betree.rs', lines 278:8-284:5 *) let rec betree_List_len_loop (t : Type0) (self : betree_List_t t) (len : u64) : Tot (result u64) (decreases (betree_List_len_loop_decreases t self len)) @@ -93,7 +93,7 @@ let betree_List_len (t : Type0) (self : betree_List_t t) : result u64 = betree_List_len_loop t self 0 (** [betree::betree::{betree::betree::List<T>#1}::reverse]: loop 0: - Source: 'src/betree.rs', lines 304:4-312:5 *) + Source: 'src/betree.rs', lines 305:8-312:5 *) let rec betree_List_reverse_loop (t : Type0) (self : betree_List_t t) (out : betree_List_t t) : Tot (result (betree_List_t t)) @@ -112,7 +112,7 @@ let betree_List_reverse betree_List_reverse_loop t self Betree_List_Nil (** [betree::betree::{betree::betree::List<T>#1}::split_at]: loop 0: - Source: 'src/betree.rs', lines 287:4-302:5 *) + Source: 'src/betree.rs', lines 289:8-302:5 *) let rec betree_List_split_at_loop (t : Type0) (n : u64) (beg : betree_List_t t) (self : betree_List_t t) : Tot (result ((betree_List_t t) & (betree_List_t t))) @@ -171,7 +171,7 @@ let betree_ListPairU64T_head_has_key end (** [betree::betree::{betree::betree::List<(u64, T)>#2}::partition_at_pivot]: loop 0: - Source: 'src/betree.rs', lines 355:4-370:5 *) + Source: 'src/betree.rs', lines 358:8-370:5 *) let rec betree_ListPairU64T_partition_at_pivot_loop (t : Type0) (pivot : u64) (beg : betree_List_t (u64 & t)) (end1 : betree_List_t (u64 & t)) (self : betree_List_t (u64 & t)) : diff --git a/tests/fstar/hashmap/Hashmap.Clauses.Template.fst b/tests/fstar/hashmap/Hashmap.Clauses.Template.fst index 888cd4ec..d6ba503e 100644 --- a/tests/fstar/hashmap/Hashmap.Clauses.Template.fst +++ b/tests/fstar/hashmap/Hashmap.Clauses.Template.fst @@ -14,7 +14,7 @@ let hashMap_allocate_slots_loop_decreases (t : Type0) admit () (** [hashmap::{hashmap::HashMap<T>}::clear]: decreases clause - Source: 'tests/src/hashmap.rs', lines 91:4-99:5 *) + Source: 'tests/src/hashmap.rs', lines 94:8-99:5 *) unfold let hashMap_clear_loop_decreases (t : Type0) (slots : alloc_vec_Vec (aList_t t)) (i : usize) : nat = diff --git a/tests/fstar/hashmap/Hashmap.Funs.fst b/tests/fstar/hashmap/Hashmap.Funs.fst index 0569c32a..40362176 100644 --- a/tests/fstar/hashmap/Hashmap.Funs.fst +++ b/tests/fstar/hashmap/Hashmap.Funs.fst @@ -60,7 +60,7 @@ let hashMap_new (t : Type0) : result (hashMap_t t) = hashMap_new_with_capacity t 32 4 5 (** [hashmap::{hashmap::HashMap<T>}::clear]: loop 0: - Source: 'tests/src/hashmap.rs', lines 91:4-99:5 *) + Source: 'tests/src/hashmap.rs', lines 94:8-99:5 *) let rec hashMap_clear_loop (t : Type0) (slots : alloc_vec_Vec (aList_t t)) (i : usize) : Tot (result (alloc_vec_Vec (aList_t t))) diff --git a/tests/fstar/misc/Loops.Clauses.Template.fst b/tests/fstar/misc/Loops.Clauses.Template.fst index 5d450275..7c77ad50 100644 --- a/tests/fstar/misc/Loops.Clauses.Template.fst +++ b/tests/fstar/misc/Loops.Clauses.Template.fst @@ -7,31 +7,31 @@ open Loops.Types #set-options "--z3rlimit 50 --fuel 1 --ifuel 1" (** [loops::sum]: decreases clause - Source: 'tests/src/loops.rs', lines 8:0-18:1 *) + Source: 'tests/src/loops.rs', lines 10:4-18:1 *) unfold let sum_loop_decreases (max : u32) (i : u32) (s : u32) : nat = admit () (** [loops::sum_with_mut_borrows]: decreases clause - Source: 'tests/src/loops.rs', lines 23:0-35:1 *) + Source: 'tests/src/loops.rs', lines 25:4-35:1 *) unfold let sum_with_mut_borrows_loop_decreases (max : u32) (i : u32) (s : u32) : nat = admit () (** [loops::sum_with_shared_borrows]: decreases clause - Source: 'tests/src/loops.rs', lines 38:0-52:1 *) + Source: 'tests/src/loops.rs', lines 40:4-52:1 *) unfold let sum_with_shared_borrows_loop_decreases (max : u32) (i : u32) (s : u32) : nat = admit () (** [loops::sum_array]: decreases clause - Source: 'tests/src/loops.rs', lines 54:0-62:1 *) + Source: 'tests/src/loops.rs', lines 56:4-62:1 *) unfold let sum_array_loop_decreases (n : usize) (a : array u32 n) (i : usize) (s : u32) : nat = admit () (** [loops::clear]: decreases clause - Source: 'tests/src/loops.rs', lines 66:0-72:1 *) + Source: 'tests/src/loops.rs', lines 67:4-72:1 *) unfold let clear_loop_decreases (v : alloc_vec_Vec u32) (i : usize) : nat = admit () diff --git a/tests/fstar/misc/Loops.Funs.fst b/tests/fstar/misc/Loops.Funs.fst index 05e77046..b9d4468a 100644 --- a/tests/fstar/misc/Loops.Funs.fst +++ b/tests/fstar/misc/Loops.Funs.fst @@ -8,7 +8,7 @@ include Loops.Clauses #set-options "--z3rlimit 50 --fuel 1 --ifuel 1" (** [loops::sum]: loop 0: - Source: 'tests/src/loops.rs', lines 8:0-18:1 *) + Source: 'tests/src/loops.rs', lines 10:4-18:1 *) let rec sum_loop (max : u32) (i : u32) (s : u32) : Tot (result u32) (decreases (sum_loop_decreases max i s)) @@ -23,7 +23,7 @@ let sum (max : u32) : result u32 = sum_loop max 0 0 (** [loops::sum_with_mut_borrows]: loop 0: - Source: 'tests/src/loops.rs', lines 23:0-35:1 *) + Source: 'tests/src/loops.rs', lines 25:4-35:1 *) let rec sum_with_mut_borrows_loop (max : u32) (i : u32) (s : u32) : Tot (result u32) (decreases (sum_with_mut_borrows_loop_decreases max i s)) @@ -41,7 +41,7 @@ let sum_with_mut_borrows (max : u32) : result u32 = sum_with_mut_borrows_loop max 0 0 (** [loops::sum_with_shared_borrows]: loop 0: - Source: 'tests/src/loops.rs', lines 38:0-52:1 *) + Source: 'tests/src/loops.rs', lines 40:4-52:1 *) let rec sum_with_shared_borrows_loop (max : u32) (i : u32) (s : u32) : Tot (result u32) (decreases (sum_with_shared_borrows_loop_decreases max i s)) @@ -59,7 +59,7 @@ let sum_with_shared_borrows (max : u32) : result u32 = sum_with_shared_borrows_loop max 0 0 (** [loops::sum_array]: loop 0: - Source: 'tests/src/loops.rs', lines 54:0-62:1 *) + Source: 'tests/src/loops.rs', lines 56:4-62:1 *) let rec sum_array_loop (n : usize) (a : array u32 n) (i : usize) (s : u32) : Tot (result u32) (decreases (sum_array_loop_decreases n a i s)) @@ -78,7 +78,7 @@ let sum_array (n : usize) (a : array u32 n) : result u32 = sum_array_loop n a 0 0 (** [loops::clear]: loop 0: - Source: 'tests/src/loops.rs', lines 66:0-72:1 *) + Source: 'tests/src/loops.rs', lines 67:4-72:1 *) let rec clear_loop (v : alloc_vec_Vec u32) (i : usize) : Tot (result (alloc_vec_Vec u32)) (decreases (clear_loop_decreases v i)) diff --git a/tests/lean/Arrays.lean b/tests/lean/Arrays.lean index bb97d5c4..bdaa7380 100644 --- a/tests/lean/Arrays.lean +++ b/tests/lean/Arrays.lean @@ -349,7 +349,7 @@ def non_copyable_array : Result Unit := take_array_t (Array.make AB 2#usize [ AB.A, AB.B ]) /- [arrays::sum]: loop 0: - Source: 'tests/src/arrays.rs', lines 245:0-253:1 -/ + Source: 'tests/src/arrays.rs', lines 247:4-253:1 -/ divergent def sum_loop (s : Slice U32) (sum1 : U32) (i : Usize) : Result U32 := let i1 := Slice.len U32 s if i < i1 @@ -367,7 +367,7 @@ def sum (s : Slice U32) : Result U32 := sum_loop s 0#u32 0#usize /- [arrays::sum2]: loop 0: - Source: 'tests/src/arrays.rs', lines 255:0-264:1 -/ + Source: 'tests/src/arrays.rs', lines 258:4-264:1 -/ divergent def sum2_loop (s : Slice U32) (s2 : Slice U32) (sum1 : U32) (i : Usize) : Result U32 := let i1 := Slice.len U32 s @@ -464,7 +464,7 @@ def ite : Result Unit := Result.ok () /- [arrays::zero_slice]: loop 0: - Source: 'tests/src/arrays.rs', lines 306:0-313:1 -/ + Source: 'tests/src/arrays.rs', lines 308:4-313:1 -/ divergent def zero_slice_loop (a : Slice U8) (i : Usize) (len : Usize) : Result (Slice U8) := if i < len @@ -483,7 +483,7 @@ def zero_slice (a : Slice U8) : Result (Slice U8) := zero_slice_loop a 0#usize len /- [arrays::iter_mut_slice]: loop 0: - Source: 'tests/src/arrays.rs', lines 315:0-321:1 -/ + Source: 'tests/src/arrays.rs', lines 317:4-321:1 -/ divergent def iter_mut_slice_loop (len : Usize) (i : Usize) : Result Unit := if i < len then do @@ -500,7 +500,7 @@ def iter_mut_slice (a : Slice U8) : Result (Slice U8) := Result.ok a /- [arrays::sum_mut_slice]: loop 0: - Source: 'tests/src/arrays.rs', lines 323:0-331:1 -/ + Source: 'tests/src/arrays.rs', lines 325:4-331:1 -/ divergent def sum_mut_slice_loop (a : Slice U32) (i : Usize) (s : U32) : Result U32 := let i1 := Slice.len U32 a diff --git a/tests/lean/Betree/Funs.lean b/tests/lean/Betree/Funs.lean index 4592e91c..dd8dfb05 100644 --- a/tests/lean/Betree/Funs.lean +++ b/tests/lean/Betree/Funs.lean @@ -83,7 +83,7 @@ def betree.upsert_update else Result.ok 0#u64 /- [betree::betree::{betree::betree::List<T>#1}::len]: loop 0: - Source: 'src/betree.rs', lines 276:4-284:5 -/ + Source: 'src/betree.rs', lines 278:8-284:5 -/ divergent def betree.List.len_loop (T : Type) (self : betree.List T) (len : U64) : Result U64 := match self with @@ -99,7 +99,7 @@ def betree.List.len (T : Type) (self : betree.List T) : Result U64 := betree.List.len_loop T self 0#u64 /- [betree::betree::{betree::betree::List<T>#1}::reverse]: loop 0: - Source: 'src/betree.rs', lines 304:4-312:5 -/ + Source: 'src/betree.rs', lines 305:8-312:5 -/ divergent def betree.List.reverse_loop (T : Type) (self : betree.List T) (out : betree.List T) : Result (betree.List T) @@ -116,7 +116,7 @@ def betree.List.reverse betree.List.reverse_loop T self betree.List.Nil /- [betree::betree::{betree::betree::List<T>#1}::split_at]: loop 0: - Source: 'src/betree.rs', lines 287:4-302:5 -/ + Source: 'src/betree.rs', lines 289:8-302:5 -/ divergent def betree.List.split_at_loop (T : Type) (n : U64) (beg : betree.List T) (self : betree.List T) : Result ((betree.List T) × (betree.List T)) @@ -174,7 +174,7 @@ def betree.ListPairU64T.head_has_key | betree.List.Nil => Result.ok false /- [betree::betree::{betree::betree::List<(u64, T)>#2}::partition_at_pivot]: loop 0: - Source: 'src/betree.rs', lines 355:4-370:5 -/ + Source: 'src/betree.rs', lines 358:8-370:5 -/ divergent def betree.ListPairU64T.partition_at_pivot_loop (T : Type) (pivot : U64) (beg : betree.List (U64 × T)) (end1 : betree.List (U64 × T)) (self : betree.List (U64 × T)) : diff --git a/tests/lean/Hashmap/Funs.lean b/tests/lean/Hashmap/Funs.lean index 7972b715..76ec5041 100644 --- a/tests/lean/Hashmap/Funs.lean +++ b/tests/lean/Hashmap/Funs.lean @@ -63,7 +63,7 @@ def HashMap.new (T : Type) : Result (HashMap T) := HashMap.new_with_capacity T 32#usize 4#usize 5#usize /- [hashmap::{hashmap::HashMap<T>}::clear]: loop 0: - Source: 'tests/src/hashmap.rs', lines 91:4-99:5 -/ + Source: 'tests/src/hashmap.rs', lines 94:8-99:5 -/ divergent def HashMap.clear_loop (T : Type) (slots : alloc.vec.Vec (AList T)) (i : Usize) : Result (alloc.vec.Vec (AList T)) diff --git a/tests/lean/Loops.lean b/tests/lean/Loops.lean index e676336e..6435cabb 100644 --- a/tests/lean/Loops.lean +++ b/tests/lean/Loops.lean @@ -9,7 +9,7 @@ set_option linter.unusedVariables false namespace loops /- [loops::sum]: loop 0: - Source: 'tests/src/loops.rs', lines 8:0-18:1 -/ + Source: 'tests/src/loops.rs', lines 10:4-18:1 -/ divergent def sum_loop (max : U32) (i : U32) (s : U32) : Result U32 := if i < max then do @@ -24,7 +24,7 @@ def sum (max : U32) : Result U32 := sum_loop max 0#u32 0#u32 /- [loops::sum_with_mut_borrows]: loop 0: - Source: 'tests/src/loops.rs', lines 23:0-35:1 -/ + Source: 'tests/src/loops.rs', lines 25:4-35:1 -/ divergent def sum_with_mut_borrows_loop (max : U32) (i : U32) (s : U32) : Result U32 := if i < max @@ -41,7 +41,7 @@ def sum_with_mut_borrows (max : U32) : Result U32 := sum_with_mut_borrows_loop max 0#u32 0#u32 /- [loops::sum_with_shared_borrows]: loop 0: - Source: 'tests/src/loops.rs', lines 38:0-52:1 -/ + Source: 'tests/src/loops.rs', lines 40:4-52:1 -/ divergent def sum_with_shared_borrows_loop (max : U32) (i : U32) (s : U32) : Result U32 := if i < max @@ -58,7 +58,7 @@ def sum_with_shared_borrows (max : U32) : Result U32 := sum_with_shared_borrows_loop max 0#u32 0#u32 /- [loops::sum_array]: loop 0: - Source: 'tests/src/loops.rs', lines 54:0-62:1 -/ + Source: 'tests/src/loops.rs', lines 56:4-62:1 -/ divergent def sum_array_loop (N : Usize) (a : Array U32 N) (i : Usize) (s : U32) : Result U32 := if i < N @@ -76,7 +76,7 @@ def sum_array (N : Usize) (a : Array U32 N) : Result U32 := sum_array_loop N a 0#usize 0#u32 /- [loops::clear]: loop 0: - Source: 'tests/src/loops.rs', lines 66:0-72:1 -/ + Source: 'tests/src/loops.rs', lines 67:4-72:1 -/ divergent def clear_loop (v : alloc.vec.Vec U32) (i : Usize) : Result (alloc.vec.Vec U32) := let i1 := alloc.vec.Vec.len U32 v diff --git a/tests/src/mutually-recursive-traits.lean.out b/tests/src/mutually-recursive-traits.lean.out index 9b3b0737..d4ca5af3 100644 --- a/tests/src/mutually-recursive-traits.lean.out +++ b/tests/src/mutually-recursive-traits.lean.out @@ -9,7 +9,7 @@ Uncaught exception: \nIn file Translate.ml, line 813:\ \nMutually recursive trait declarations are not supported") -Raised at Aeneas__Errors.craise_opt_span in file "Errors.ml", line 46, characters 4-76 +Raised at Aeneas__Errors.craise_opt_span in file "Errors.ml", line 47, characters 4-76 Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15 Called from Aeneas__Translate.extract_definitions in file "Translate.ml", line 836, characters 2-52 Called from Aeneas__Translate.extract_file in file "Translate.ml", line 963, characters 2-36 |