Skip to content

Commit

Permalink
Merge pull request #762 from viperproject/meilers_num_parallel_verifi…
Browse files Browse the repository at this point in the history
…er_fix

Validation and a better explanation for the --numberOfParallelVerifiers option
  • Loading branch information
marcoeilers authored Oct 17, 2023
2 parents a234555 + bbfe9b8 commit 41012ee
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/scala/Config.scala
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,10 @@ class Config(args: Seq[String]) extends SilFrontendConfig(args, "Silicon") {
)(singleArgConverter(mode => StateConsolidationMode(mode.toInt)))

val numberOfParallelVerifiers: ScallopOption[Int] = opt[Int]("numberOfParallelVerifiers",
descr = ( "Number of verifiers run in parallel. This number plus one is the number of provers "
+ s"run in parallel (default: ${Runtime.getRuntime.availableProcessors()})"),
descr = ( "Number of verifiers (and therefore also prover instances) run in parallel for method verification." +
"A value of 1 leads to sequential method verification. " +
"Functions and predicates are always verified sequentially on a separate prover instance. " +
s"Default: ${Runtime.getRuntime.availableProcessors()}"),
default = Some(Runtime.getRuntime.availableProcessors()),
noshort = true
)
Expand Down Expand Up @@ -815,6 +817,11 @@ class Config(args: Seq[String]) extends SilFrontendConfig(args, "Silicon") {
case _ => Right(())
}

validateOpt(numberOfParallelVerifiers) {
case Some(n) if n <= 0 => Left(s"Number of parallel verifiers must be positive, but $n was provided")
case _ => Right()
}

validateFileOpt(logConfig)
validateFileOpt(setAxiomatizationFile)
validateFileOpt(multisetAxiomatizationFile)
Expand Down

0 comments on commit 41012ee

Please sign in to comment.