Skip to content

Commit 945a8da

Browse files
committed
merge_diff: add proof_kind field
1 parent 441772e commit 945a8da

File tree

5 files changed

+4900
-2447
lines changed

5 files changed

+4900
-2447
lines changed

src/bin/verify_rust_std/merge.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,23 @@ impl SubCmdMerge {
4848
for func in &mut hash_json {
4949
let file = func.file.strip_prefix(&self.strip_hash_json_prefix).unwrap_or(&func.file);
5050
let fn_name = &*func.name;
51-
let value = &*func.hash;
51+
let value = (&*func.hash, func.proof_kind);
5252
hash_map.insert((file, fn_name), value);
5353
}
5454

5555
let cap = kani_list.totals.standard_harnesses + kani_list.totals.contract_harnesses;
5656
let mut v_merge = Vec::with_capacity(cap);
5757
for file_func in kani_list.file_func_name() {
5858
let (file, func) = file_func;
59+
let (hash, proof_kind) = match hash_map.get(&file_func) {
60+
Some((hash, proof_kind)) => (Some((*hash).into()), *proof_kind),
61+
None => (None, None),
62+
};
5963
v_merge.push(MergeHashKaniList {
6064
file: file.into(),
6165
func: func.into(),
62-
hash: hash_map.get(&file_func).map(|s| (*s).into()),
66+
hash,
67+
proof_kind,
6368
});
6469
}
6570
v_merge.sort_unstable();

src/diff.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ pub struct MergeHashKaniList {
254254
#[serde(skip_serializing_if = "Option::is_none")]
255255
#[serde(default)]
256256
pub hash: Option<Box<str>>,
257+
#[serde(skip_serializing_if = "Option::is_none")]
258+
#[serde(default)]
259+
pub proof_kind: Option<ProofKind>,
257260
}
258261

259262
/// Compare two `MergeHashKaniList`, and returns the ones from new that don't match the old,

0 commit comments

Comments
 (0)