Skip to content

Commit 6dd36a8

Browse files
authored
Merge pull request #107 from os-checker/ui-time-column
UI: add column of execution time
2 parents b5b4c25 + a41e1a0 commit 6dd36a8

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

ui/app/components/Kani.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ type ModName = { name: string, n: number };
4141
const selectedMods = ref<string[]>([]);
4242
const mod_names = computed<ModName[]>(() => {
4343
return Object.entries(
44-
raw.value.reduce((acc, { func }) => {
45-
const prefix = func.split("::")[0] ?? func;
44+
raw.value.reduce((acc, { harness }) => {
45+
const prefix = harness.split("::")[0] ?? harness;
4646
acc[prefix] = (acc[prefix] || 0) + 1;
4747
return acc;
4848
}, {} as { [key: string]: number })
@@ -72,7 +72,7 @@ watch([selectedMods, selectedProofKind], ([mods, proofs]) => {
7272
// consider func mod
7373
push = empty_mod;
7474
for (const name of mods) {
75-
if (val.func.startsWith(`${name}::`)) { push = true; break; }
75+
if (val.harness.startsWith(`${name}::`)) { push = true; break; }
7676
}
7777
if (push) v.push(val);
7878
}

ui/app/shared/utils/kani.ts

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
import type { DataTableSortMeta } from "primevue";
22
import { FilterMatchMode } from '@primevue/core/api';
33

4-
export const URL_MERGE_DIFF = "https://raw.githubusercontent.com/os-checker/verify-rust-std_data/refs/heads/main/merge_diff-proofs-only.json";
4+
export const URL_MERGE_DIFF = "https://raw.githubusercontent.com/os-checker/verify-rust-std_data/refs/heads/main/merge_results-core.json";
55

66
export type VecMergeHashKaniList = MergeHashKaniList[];
77

88
export interface MergeHashKaniList {
9-
file: string;
10-
func: string;
11-
hash?: string;
12-
proof_kind?: ProofKind;
9+
file: string,
10+
harness: string,
11+
proof_kind?: ProofKind,
12+
hash?: string,
13+
time?: number,
14+
props: number,
15+
func: {
16+
name: string,
17+
safe: string,
18+
file: String,
19+
},
20+
ok?: boolean,
21+
n_fialed_properties?: number,
1322
}
1423

1524
export enum ProofKind {
@@ -35,15 +44,19 @@ export const center = {
3544
columnHeaderContent: { style: { "justify-content": "center" } },
3645
bodyCell: { style: { "text-align": "center" } }
3746
};
47+
export const right = {
48+
columnHeaderContent: { style: { "justify-content": "flex-end" } },
49+
bodyCell: { style: { "text-align": "right" } }
50+
};
3851

3952
export const MergeKaniColumns: MergeKaniColumn[] = [
4053
{
4154
key: "file",
4255
col: { field: "file", header: "File Path", width: "15%", sortable: true },
4356
},
4457
{
45-
key: "func",
46-
col: { field: "func", header: "Function", width: "25%", sortable: true },
58+
key: "harness",
59+
col: { field: "harness", header: "Harness", width: "25%", sortable: true },
4760
},
4861
{
4962
key: "hash",
@@ -53,6 +66,10 @@ export const MergeKaniColumns: MergeKaniColumn[] = [
5366
key: "proof_kind",
5467
col: { field: "proof_kind", header: "Proof Kind", width: "12%", sortable: true, pt: center },
5568
},
69+
{
70+
key: "time",
71+
col: { field: "time", header: "Time (ms)", width: "5%", sortable: true, pt: right },
72+
},
5673
];
5774

5875
export const multiSort: DataTableSortMeta[] = [
@@ -64,7 +81,7 @@ export const FILTERS = {
6481
filters: {
6582
global: { value: null, matchMode: FilterMatchMode.CONTAINS },
6683
},
67-
fields: ["file", "func"]
84+
fields: ["file", "harness"]
6885
};
6986

7087
export const optionsProofKind: string[] = [ProofKind.Standard, ProofKind.Contract];

0 commit comments

Comments
 (0)