Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
celinval committed Jul 31, 2024
1 parent 5fab514 commit f4260e0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion kani-compiler/src/kani_middle/codegen_units.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl CodegenUnits {
/// Generate [KaniMetadata] for the target crate.
fn generate_metadata(&self) -> KaniMetadata {
let (proof_harnesses, test_harnesses) =
self.harness_info.values().cloned().partition(|md| md.attributes.is_proof());
self.harness_info.values().cloned().partition(|md| md.attributes.is_proof_harness());
KaniMetadata {
crate_name: self.crate_info.name.clone(),
proof_harnesses,
Expand Down
12 changes: 7 additions & 5 deletions kani-driver/src/concrete_playback/test_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,20 @@ fn gen_test_doc(harness: &HarnessMetadata, property: &Property) -> String {
property.description
));
if !harness.attributes.stubs.is_empty() {
doc_str.push_str(r#"///
doc_str.push_str(
r#"///
/// # Warning
///
/// Concrete playback tests combined with stubs or contracts is highly
///
/// Concrete playback tests combined with stubs or contracts is highly
/// experimental, and subject to change.
///
///
/// The original harness has stubs which are not applied to this test.
/// This may cause a mismatch of non-deterministic values if the stub
/// creates any non-deterministic value.
/// The execution path may also differ, which can be used to refine the stub
/// logic.
"#);
"#,
);
}
doc_str
}
Expand Down
2 changes: 1 addition & 1 deletion kani_metadata/src/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl HarnessAttributes {
}

/// Return whether this is a proof harness.
pub fn is_proof(&self) -> bool {
pub fn is_proof_harness(&self) -> bool {
matches!(self.kind, HarnessKind::Proof | HarnessKind::ProofForContract { .. })
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/script-based-pre/playback_expected/playback.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ run() {

ROOT_DIR=$(git rev-parse --show-toplevel)
MODIFIED_DIR=modified
rm -rf $MODIFIED_DIR
mkdir $MODIFIED_DIR
rm -rf "${MODIFIED_DIR}"
mkdir "${MODIFIED_DIR}"

for rs in src/*.rs; do
if [[ -e "${rs}" ]]; then
Expand Down

0 comments on commit f4260e0

Please sign in to comment.