diff --git a/src/main/scala/viper/gobra/backend/ViperBackends.scala b/src/main/scala/viper/gobra/backend/ViperBackends.scala index e498fa501..a9ad9eb6c 100644 --- a/src/main/scala/viper/gobra/backend/ViperBackends.scala +++ b/src/main/scala/viper/gobra/backend/ViperBackends.scala @@ -31,7 +31,7 @@ object ViperBackends { if (config.z3APIMode) { options = options ++ Vector(s"--prover=${Z3ProverAPI.name}") } - if (config.disableNLRI) { + if (config.disableNLIR) { options = options ++ Vector(s"--disableNLRI") } val mceSiliconOpt = config.mceMode match { diff --git a/src/main/scala/viper/gobra/frontend/Config.scala b/src/main/scala/viper/gobra/frontend/Config.scala index b4162d576..47835fb31 100644 --- a/src/main/scala/viper/gobra/frontend/Config.scala +++ b/src/main/scala/viper/gobra/frontend/Config.scala @@ -66,6 +66,7 @@ object ConfigDefaults { lazy val DefaultParallelizeBranches: Boolean = false lazy val DefaultConditionalizePermissions: Boolean = false lazy val DefaultZ3APIMode: Boolean = false + lazy val DefaultDisableNLIR: Boolean = false lazy val DefaultMCEMode: MCE.Mode = MCE.Enabled lazy val DefaultEnableLazyImports: Boolean = false lazy val DefaultNoVerify: Boolean = false @@ -130,6 +131,7 @@ case class Config( parallelizeBranches: Boolean = ConfigDefaults.DefaultParallelizeBranches, conditionalizePermissions: Boolean = ConfigDefaults.DefaultConditionalizePermissions, z3APIMode: Boolean = ConfigDefaults.DefaultZ3APIMode, + disableNLIR: Boolean = ConfigDefaults.DefaultDisableNLIR, mceMode: MCE.Mode = ConfigDefaults.DefaultMCEMode, enableLazyImports: Boolean = ConfigDefaults.DefaultEnableLazyImports, noVerify: Boolean = ConfigDefaults.DefaultNoVerify, @@ -180,6 +182,7 @@ case class Config( parallelizeBranches = parallelizeBranches, conditionalizePermissions = conditionalizePermissions, z3APIMode = z3APIMode || other.z3APIMode, + disableNLIR = disableNLIR || other.disableNLIR, mceMode = mceMode, enableLazyImports = enableLazyImports || other.enableLazyImports, noVerify = noVerify || other.noVerify, @@ -233,6 +236,7 @@ case class BaseConfig(gobraDirectory: Path = ConfigDefaults.DefaultGobraDirector parallelizeBranches: Boolean = ConfigDefaults.DefaultParallelizeBranches, conditionalizePermissions: Boolean = ConfigDefaults.DefaultConditionalizePermissions, z3APIMode: Boolean = ConfigDefaults.DefaultZ3APIMode, + disableNLIR: Boolean = ConfigDefaults.DefaultDisableNLIR, mceMode: MCE.Mode = ConfigDefaults.DefaultMCEMode, enableLazyImports: Boolean = ConfigDefaults.DefaultEnableLazyImports, noVerify: Boolean = ConfigDefaults.DefaultNoVerify, @@ -290,6 +294,7 @@ trait RawConfig { parallelizeBranches = baseConfig.parallelizeBranches, conditionalizePermissions = baseConfig.conditionalizePermissions, z3APIMode = baseConfig.z3APIMode, + disableNLIR = baseConfig.disableNLIR, mceMode = baseConfig.mceMode, enableLazyImports = baseConfig.enableLazyImports, noVerify = baseConfig.noVerify, @@ -562,13 +567,6 @@ class ScallopGobraConfig(arguments: Seq[String], isInputOptional: Boolean = fals noshort = true ) - val disableNLIR: ScallopOption[Boolean] = opt[Boolean]( - name = "disableNLIR", - descr = "Disable non-linear integer arithmetics. Non compatible using Z3 via API or Carbon", - noshort = true, - default = Some(false) - ) - lazy val packageTimeoutDuration: Duration = packageTimeout.toOption match { case Some(d) => Duration(d) case _ => Duration.Inf @@ -654,6 +652,13 @@ class ScallopGobraConfig(arguments: Seq[String], isInputOptional: Boolean = fals noshort = true, ) + val disableNLIR: ScallopOption[Boolean] = opt[Boolean]( + name = "disableNLIR", + descr = "Disable non-linear integer arithmetics. Non compatible using Z3 via API or Carbon", + default = Some(ConfigDefaults.DefaultDisableNLIR), + noshort = true, + ) + val mceMode: ScallopOption[MCE.Mode] = { val on = "on" val off = "off"