Skip to content

Commit

Permalink
Update charon
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Sep 2, 2024
1 parent e39c93d commit 3bc2f77
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charon-pin
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This is the commit from https://github.com/AeneasVerif/charon that should be used with this version of aeneas.
f1dc801340e4105927fe8f7be17b16ecaef78699
272fef524b8c734695ee3f3d112b3a094bdcd76d
9 changes: 5 additions & 4 deletions compiler/Extract.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2774,6 +2774,7 @@ let extract_trait_impl (ctx : extraction_ctx) (fmt : F.formatter)
* Extract the items
*)
let trait_decl_id = impl.impl_trait.trait_decl_id in
let trait_decl = TraitDeclId.Map.find trait_decl_id ctx.crate.trait_decls in

(* The constants *)
List.iter
Expand Down Expand Up @@ -2810,19 +2811,19 @@ let extract_trait_impl (ctx : extraction_ctx) (fmt : F.formatter)
impl.types;

(* The parent clauses *)
TraitClauseId.iteri
(fun clause_id trait_ref ->
List.iter
(fun (clause, trait_ref) ->
let item_name =
ctx_get_trait_parent_clause impl.item_meta.span trait_decl_id
clause_id ctx
clause.T.clause_id ctx
in
let ty () =
F.pp_print_space fmt ();
extract_trait_ref impl.item_meta.span ctx fmt TypeDeclId.Set.empty
false trait_ref
in
extract_trait_impl_item ctx fmt item_name ty)
impl.parent_trait_refs;
(List.combine trait_decl.parent_clauses impl.parent_trait_refs);

(* The required methods *)
List.iter
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
betree-llbc = charon.extractCrateWithCharon.${system} {
name = "betree";
src = ./tests/src/betree;
charonFlags = "--polonius --opaque=crate::betree_utils";
charonFlags = "--polonius --opaque=crate::betree_utils --hide-marker-traits";
craneExtraArgs.checkPhaseCargoCommand = ''
cargo rustc -- --test -Zpolonius
./target/debug/betree
Expand Down
8 changes: 7 additions & 1 deletion tests/test_runner/run_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ let run_charon (env : runner_env) (case : Input.t) =
[
env.charon_path;
"--no-cargo";
"--hide-marker-traits";
"--input";
case.path;
"--crate";
Expand All @@ -143,7 +144,12 @@ let run_charon (env : runner_env) (case : Input.t) =
in
if generate then (
let args =
[ env.charon_path; "--dest"; Filename_unix.realpath env.llbc_dir ]
[
env.charon_path;
"--hide-marker-traits";
"--dest";
Filename_unix.realpath env.llbc_dir;
]
in
let args = List.append args case.charon_options in
(* Run Charon inside the crate *)
Expand Down

0 comments on commit 3bc2f77

Please sign in to comment.