Skip to content

Commit

Permalink
slicing: better wording in the model
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp15b committed Jul 1, 2024
1 parent efe6614 commit dbb1d67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/slicing/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ impl SliceModel {
})
}

/// Return the number of statements in this model.
pub fn len(&self) -> usize {
self.stmts.len()
}

/// Iterate over all [`Ident`]s for slice variables.
pub fn iter_variables(&self) -> impl Iterator<Item = Ident> + '_ {
self.stmts.iter().map(|(stmt, _res)| stmt.ident)
Expand Down
5 changes: 3 additions & 2 deletions src/smt/pretty_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ pub fn pretty_vc_value<'smt, 'ctx>(
let slice_pre = pretty_eval_result(value)
.append(Doc::line_())
.append(Doc::text(format!(
"(slicing removed {} statements)",
num_sliced_stmts
"(slicing removed {}/{} assertions)",
num_sliced_stmts,
slice_model.len()
)));
lines.push(Doc::nil());
lines.push(
Expand Down

0 comments on commit dbb1d67

Please sign in to comment.