diff options
author | 0biha <unknown> | 2014-12-31 00:01:45 +0100 |
---|---|---|
committer | 0biha <unknown> | 2014-12-31 00:01:45 +0100 |
commit | c1c5cf54a3194b3b46ae05d42372e08da04daafd (patch) | |
tree | 441b178c703eebbfc896a5a971dc3237f9cd9b30 /Source/Core/CommandLineOptions.cs | |
parent | 217b0584ba0008d019e35f4e8249c3e62bbefa3a (diff) |
Made invariant of class 'CommandLineOptions' robust by changing the design
(replaced public variable by private variable + getter/setter).
Diffstat (limited to 'Source/Core/CommandLineOptions.cs')
-rw-r--r-- | Source/Core/CommandLineOptions.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/Core/CommandLineOptions.cs b/Source/Core/CommandLineOptions.cs index 41ea4d03..53a3df0e 100644 --- a/Source/Core/CommandLineOptions.cs +++ b/Source/Core/CommandLineOptions.cs @@ -545,7 +545,21 @@ namespace Microsoft.Boogie { public bool ExpandLambdas = true; // not useful from command line, only to be set to false programatically
public bool DoModSetAnalysis = false;
public bool UseAbstractInterpretation = true; // true iff the user want to use abstract interpretation
- public int /*0..9*/StepsBeforeWidening = 0; // The number of steps that must be done before applying a widen operator
+ private int /*0..9*/stepsBeforeWidening = 0; // The number of steps that must be done before applying a widen operator
+
+ public int StepsBeforeWidening
+ {
+ get
+ {
+ Contract.Ensures(0 <= Contract.Result<int>() && Contract.Result<int>() <= 9);
+ return this.stepsBeforeWidening;
+ }
+ set
+ {
+ Contract.Requires(0 <= value && value <= 9);
+ this.stepsBeforeWidening = value;
+ }
+ }
public string OwickiGriesDesugaredOutputFile = null;
public bool TrustAtomicityTypes = false;
|