Skip to content

Commit 28c42cb

Browse files
crumplecupCopilot
andcommitted
fix(kani): regenerate generated harnesses and update verif artifacts
Regenerated harnesses now use kani_depth1() for String params. Creusot COMA artifacts updated to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6964776 commit 28c42cb

56 files changed

Lines changed: 107 additions & 78 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crates/elicit_proofs/src/kani/diag.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,14 @@ fn diag_explain_ready_non_explain_view() {
222222
let proof = elicitation::contracts::Established::<ArchivePanelConsistent>::assert();
223223
let plan = ExplainPlan::kani_depth0();
224224
let mode = ExplainNodeMode::kani_depth0();
225-
let _ = explain_ready(state, proof, String::kani_depth1(), String::kani_depth1(), plan, mode);
225+
let _ = explain_ready(
226+
state,
227+
proof,
228+
String::kani_depth1(),
229+
String::kani_depth1(),
230+
plan,
231+
mode,
232+
);
226233
}
227234

228235
/// Theory Q: explain_ready with ExplainView state but drop the result immediately.

crates/elicit_proofs/src/kani/gallery/level18.rs

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,15 @@ pub fn g18_rename(state: G18State, new_label: String) -> G18State {
102102
#[kani::proof_for_contract(g18_rename)]
103103
fn gallery18a_vacuous_empty() {
104104
// Witness (depth2-equivalent): active with empty label — assume will prune
105-
let witness = G18State::Active { label: String::new() };
105+
let witness = G18State::Active {
106+
label: String::new(),
107+
};
106108
kani::assume(g18_consistent(&witness));
107109
forget(witness);
108110
// Actual input (depth1-equivalent): also empty — same problem
109-
let state = G18State::Active { label: String::new() };
111+
let state = G18State::Active {
112+
label: String::new(),
113+
};
110114
let new_label = String::from("b");
111115
let result = g18_rename(state, new_label);
112116
forget(result);
@@ -126,11 +130,15 @@ fn gallery18a_vacuous_empty() {
126130
#[kani::proof_for_contract(g18_rename)]
127131
fn gallery18b_literal_depth1_nonempty() {
128132
// Witness: depth2-equivalent, non-empty so assume passes, then forgotten
129-
let witness = G18State::Active { label: String::from("ab") };
133+
let witness = G18State::Active {
134+
label: String::from("ab"),
135+
};
130136
kani::assume(g18_consistent(&witness));
131137
forget(witness);
132138
// Actual input: depth1-equivalent with concrete non-empty string
133-
let state = G18State::Active { label: String::from("a") };
139+
let state = G18State::Active {
140+
label: String::from("a"),
141+
};
134142
let new_label = String::from("b");
135143
let result = g18_rename(state, new_label);
136144
forget(result);
@@ -147,10 +155,14 @@ fn gallery18b_literal_depth1_nonempty() {
147155
#[cfg(kani)]
148156
#[kani::proof_for_contract(g18_rename)]
149157
fn gallery18c_literal_depth1_drop() {
150-
let witness = G18State::Active { label: String::from("ab") };
158+
let witness = G18State::Active {
159+
label: String::from("ab"),
160+
};
151161
kani::assume(g18_consistent(&witness));
152162
forget(witness);
153-
let state = G18State::Active { label: String::from("a") };
163+
let state = G18State::Active {
164+
label: String::from("a"),
165+
};
154166
let new_label = String::from("b");
155167
// result is dropped here (not forgotten) — exercises DFCC's free check
156168
let _result = g18_rename(state, new_label);
@@ -165,7 +177,9 @@ fn gallery18c_literal_depth1_drop() {
165177
#[cfg(kani)]
166178
#[kani::proof_for_contract(g18_rename)]
167179
fn gallery18d_symbolic_depth2_drop() {
168-
let witness = G18State::Active { label: String::from("ab") };
180+
let witness = G18State::Active {
181+
label: String::from("ab"),
182+
};
169183
kani::assume(g18_consistent(&witness));
170184
forget(witness);
171185
// Symbolic two-char string — same construction as current kani_depth2
@@ -188,10 +202,14 @@ fn gallery18d_symbolic_depth2_drop() {
188202
#[cfg(kani)]
189203
#[kani::proof_for_contract(g18_rename)]
190204
fn gallery18e_literal_depth2_nonempty() {
191-
let witness = G18State::Active { label: String::from("abc") };
205+
let witness = G18State::Active {
206+
label: String::from("abc"),
207+
};
192208
kani::assume(g18_consistent(&witness));
193209
forget(witness);
194-
let state = G18State::Active { label: String::from("ab") };
210+
let state = G18State::Active {
211+
label: String::from("ab"),
212+
};
195213
let new_label = String::from("c");
196214
let result = g18_rename(state, new_label);
197215
forget(result);
@@ -218,12 +236,16 @@ fn gallery18f_symbolic_depth1_one_char() {
218236
let c2: char = kani::any();
219237
let mut witness_label = c1.to_string();
220238
witness_label.push(c2);
221-
let witness = G18State::Active { label: witness_label };
239+
let witness = G18State::Active {
240+
label: witness_label,
241+
};
222242
kani::assume(g18_consistent(&witness));
223243
forget(witness);
224244
// Actual input: ONE symbolic char — the true inductive depth1 step
225245
let one_char: char = kani::any();
226-
let state = G18State::Active { label: one_char.to_string() };
246+
let state = G18State::Active {
247+
label: one_char.to_string(),
248+
};
227249
let new_label = String::from("b");
228250
let result = g18_rename(state, new_label);
229251
forget(result);

crates/elicit_proofs/src/kani/generated/archive_connection.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
#[cfg(kani)]
99
use elicit_server::archive::vsm::{
10-
archive_connection_consistent, begin_connect_kv, begin_connect_sql, connection_error,
11-
disconnect, finish_connect_kv, finish_connect_sql, reconnect, ArchiveConnectionConsistent,
12-
ArchiveConnectionState,
10+
ArchiveConnectionConsistent, ArchiveConnectionState, archive_connection_consistent,
11+
begin_connect_kv, begin_connect_sql, connection_error, disconnect, finish_connect_kv,
12+
finish_connect_sql, reconnect,
1313
};
1414
#[cfg(kani)]
1515
use elicit_server::archive::{BackendKind, DatabaseDescriptor};

crates/elicit_proofs/src/kani/generated/archive_nav.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
// The `kani` cfg key is set by the Kani toolchain, not by cargo.
66
#![allow(unexpected_cfgs)]
77

8+
#[cfg(kani)]
9+
use elicit_server::archive::NavTree;
810
#[cfg(kani)]
911
use elicit_server::archive::vsm::{
10-
apply_filter, archive_nav_consistent, clear_filter, collapse_schema, expand_schema, load_nav,
11-
move_cursor_down, move_cursor_up, nav_loaded, nav_refresh, ArchiveNavConsistent,
12-
ArchiveNavState,
12+
ArchiveNavConsistent, ArchiveNavState, apply_filter, archive_nav_consistent, clear_filter,
13+
collapse_schema, expand_schema, load_nav, move_cursor_down, move_cursor_up, nav_loaded,
14+
nav_refresh,
1315
};
1416
#[cfg(kani)]
15-
use elicit_server::archive::NavTree;
16-
#[cfg(kani)]
1717
use elicitation::Established;
1818

1919
#[cfg(kani)]

crates/elicit_proofs/src/kani/generated/archive_overlay.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
#[cfg(kani)]
99
use elicit_server::archive::vsm::{
10-
archive_overlay_consistent, close_overlay, open_export_picker, open_help, open_save_prompt,
11-
open_saved_browser, picker_move_down, picker_move_up, prompt_backspace, prompt_push,
12-
saved_browser_down, saved_browser_up, ArchiveOverlayConsistent, ArchiveOverlayState,
10+
ArchiveOverlayConsistent, ArchiveOverlayState, archive_overlay_consistent, close_overlay,
11+
open_export_picker, open_help, open_save_prompt, open_saved_browser, picker_move_down,
12+
picker_move_up, prompt_backspace, prompt_push, saved_browser_down, saved_browser_up,
1313
};
1414
#[cfg(kani)]
1515
use elicit_server::archive::{ExportFormat, SavedQuery};

crates/elicit_proofs/src/kani/generated/archive_panel.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ use elicit_server::archive::display::{
1313
};
1414
#[cfg(kani)]
1515
use elicit_server::archive::vsm::{
16-
abort_edits, admin_ready, archive_panel_consistent, begin_edit, column_detail, commit_edits,
17-
constraints_ready, data_grid_ready, ddl_ready, erd_ready, explain_ready, export_ready,
18-
history_ready, indexes_ready, monitor_ready, open_connection_editor, open_export_panel,
19-
open_help_panel, open_saved_panel, open_sql_editor, panel_error, panel_loading, query_complete,
20-
saved_ready, ArchivePanelConsistent, ArchivePanelState,
16+
ArchivePanelConsistent, ArchivePanelState, abort_edits, admin_ready, archive_panel_consistent,
17+
begin_edit, column_detail, commit_edits, constraints_ready, data_grid_ready, ddl_ready,
18+
erd_ready, explain_ready, export_ready, history_ready, indexes_ready, monitor_ready,
19+
open_connection_editor, open_export_panel, open_help_panel, open_saved_panel, open_sql_editor,
20+
panel_error, panel_loading, query_complete, saved_ready,
2121
};
2222
#[cfg(kani)]
2323
use elicit_server::archive::{

verif/elicit_proofs_rlib/creusot/generated/archive_connection/begin_connect_kv_creusot.coma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let%span sarchive_connection'8 = "/home/erik/repos/elicitation/crates/elicit_pro
1313
let%span sarchive_connection'9 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 59 15 59 52
1414
let%span sarchive_connection'10 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 60 14 60 54
1515
let%span sarchive_connection'11 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 25 16 25 20
16-
let%span sconnection = "/home/erik/repos/elicitation/crates/elicit_server/src/archive/vsm/connection.rs" 154 0 161 1
16+
let%span sconnection = "/home/erik/repos/elicitation/crates/elicit_server/src/archive/vsm/connection.rs" 152 0 152 59
1717

1818
use creusot.prelude.Any
1919

verif/elicit_proofs_rlib/creusot/generated/archive_connection/begin_connect_sql_creusot.coma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let%span sarchive_connection'8 = "/home/erik/repos/elicitation/crates/elicit_pro
1313
let%span sarchive_connection'9 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 37 15 37 52
1414
let%span sarchive_connection'10 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 38 14 38 54
1515
let%span sarchive_connection'11 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 25 16 25 20
16-
let%span sconnection = "/home/erik/repos/elicitation/crates/elicit_server/src/archive/vsm/connection.rs" 133 0 141 1
16+
let%span sconnection = "/home/erik/repos/elicitation/crates/elicit_server/src/archive/vsm/connection.rs" 131 0 131 59
1717

1818
use creusot.prelude.Any
1919

verif/elicit_proofs_rlib/creusot/generated/archive_connection/connection_error_creusot.coma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let%span sarchive_connection'8 = "/home/erik/repos/elicitation/crates/elicit_pro
1313
let%span sarchive_connection'9 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 162 15 162 52
1414
let%span sarchive_connection'10 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 163 14 163 54
1515
let%span sarchive_connection'11 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 25 16 25 20
16-
let%span sconnection = "/home/erik/repos/elicitation/crates/elicit_server/src/archive/vsm/connection.rs" 233 0 240 1
16+
let%span sconnection = "/home/erik/repos/elicitation/crates/elicit_server/src/archive/vsm/connection.rs" 231 0 231 59
1717

1818
use creusot.prelude.Any
1919

verif/elicit_proofs_rlib/creusot/generated/archive_connection/disconnect_creusot.coma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let%span sarchive_connection'6 = "/home/erik/repos/elicitation/crates/elicit_pro
1111
let%span sarchive_connection'7 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 122 15 122 52
1212
let%span sarchive_connection'8 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 123 14 123 54
1313
let%span sarchive_connection'9 = "/home/erik/repos/elicitation/crates/elicit_proofs/src/creusot/generated/archive_connection.rs" 25 16 25 20
14-
let%span sconnection = "/home/erik/repos/elicitation/crates/elicit_server/src/archive/vsm/connection.rs" 202 0 208 1
14+
let%span sconnection = "/home/erik/repos/elicitation/crates/elicit_server/src/archive/vsm/connection.rs" 200 0 200 59
1515

1616
use creusot.prelude.Any
1717

0 commit comments

Comments
 (0)