summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorGravatar Dan Liew <daniel.liew@imperial.ac.uk>2015-01-29 02:15:58 +0000
committerGravatar Dan Liew <daniel.liew@imperial.ac.uk>2015-01-29 02:15:58 +0000
commit2ab28bcd14c2c38567186e9aa20afed2b49321a6 (patch)
tree720e313457fb7f4eb30a317732df4443391adee9 /Source/Core
parent11b8e8c35f6764b266392b9c0f6086b07a803a33 (diff)
Prevent a BvConst being changed once constructed. The motivation
for doing this is that we would like a LiteralExpr to be immutable when constructed but because the "Val" field can point to a BvConst which is an object it means that although the Val reference cannot change the BvConst could be changed.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/AbsyExpr.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/AbsyExpr.cs b/Source/Core/AbsyExpr.cs
index 7b4900f2..12289c40 100644
--- a/Source/Core/AbsyExpr.cs
+++ b/Source/Core/AbsyExpr.cs
@@ -680,8 +680,8 @@ namespace Microsoft.Boogie {
}
public class BvConst {
- public BigNum Value;
- public int Bits;
+ public readonly BigNum Value;
+ public readonly int Bits;
public BvConst(BigNum v, int b) {
Contract.Assert(v.Signum >= 0);