diff --git a/prusti-common/src/vir/to_viper.rs b/prusti-common/src/vir/to_viper.rs
index 3d0d814e6e7..8f0beac6ea9 100644
--- a/prusti-common/src/vir/to_viper.rs
+++ b/prusti-common/src/vir/to_viper.rs
@@ -93,7 +93,10 @@ impl<'v> ToViper<'v, viper::Position<'v>> for Position {
line = %self.line(), column = %self.column(), id = %self.id()
))]
fn to_viper(&self, _context: Context, ast: &AstFactory<'v>) -> viper::Position<'v> {
- ast.identifier_position(self.line(), self.column(), self.id().to_string())
+ // The line and column of a vir::Position refer to the source Rust program.
+ // Line and columns in Viper positions have a different semantics, because Silicon
+ // deduplicates error messages based on them.
+ ast.identifier_position(self.id() as i32, 0, self.id().to_string())
}
}
@@ -323,8 +326,7 @@ impl<'v> ToViper<'v, viper::Stmt<'v>> for Stmt {
),
pos.to_viper(context, ast),
);
- let position =
- ast.identifier_position(pos.line(), pos.column(), pos.id().to_string());
+ let position = pos.to_viper(context, ast);
let apply = ast.apply(wand.to_viper(context, ast), position);
ast.seqn(&[inhale, apply], &[])
}
diff --git a/prusti-server/src/verification_request.rs b/prusti-server/src/verification_request.rs
index 6f33840ea70..273f44ea5d9 100644
--- a/prusti-server/src/verification_request.rs
+++ b/prusti-server/src/verification_request.rs
@@ -37,6 +37,10 @@ impl ViperBackendConfig {
let mut verifier_args = config::extra_verifier_args();
match backend {
VerificationBackend::Silicon => {
+ verifier_args.push(format!(
+ "--numberOfErrorsToReport={}",
+ config::num_errors_per_function()
+ ));
if config::use_more_complete_exhale() {
verifier_args.push("--enableMoreCompleteExhale".to_string());
}
diff --git a/prusti-utils/src/config.rs b/prusti-utils/src/config.rs
index 65a6bc9e624..d27f0f992cd 100644
--- a/prusti-utils/src/config.rs
+++ b/prusti-utils/src/config.rs
@@ -129,6 +129,7 @@ lazy_static::lazy_static! {
settings.set_default("use_new_encoder", true).unwrap();
settings.set_default::