diff options
author | Pantazis Deligiannis <pdeligia@me.com> | 2013-07-06 11:29:20 +0100 |
---|---|---|
committer | Pantazis Deligiannis <pdeligia@me.com> | 2013-07-06 11:29:20 +0100 |
commit | 5dcb1f8e4f28db2f449cb318fc8f114e2982cc7c (patch) | |
tree | d1a47b7f223d2db43fbb589e5f6dddc2d03c3a44 /Source/VCExpr | |
parent | 6e773bb7b5dff32ca7ba552b2562ccc18b02fece (diff) | |
parent | 5fe9141ded93f6eab4e213c1d082b68ac557d81a (diff) |
merge
Diffstat (limited to 'Source/VCExpr')
-rw-r--r-- | Source/VCExpr/Boogie2VCExpr.cs | 5 | ||||
-rw-r--r-- | Source/VCExpr/VCExprAST.cs | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/Source/VCExpr/Boogie2VCExpr.cs b/Source/VCExpr/Boogie2VCExpr.cs index d08a4d4b..2ff93c54 100644 --- a/Source/VCExpr/Boogie2VCExpr.cs +++ b/Source/VCExpr/Boogie2VCExpr.cs @@ -272,7 +272,10 @@ namespace Microsoft.Boogie.VCExprAST { // global variables, local variables, incarnations, etc. are
// bound the first time they occur
if (!UnboundVariables.TryGetValue(boogieVar, out res)) {
- res = new VCExprVar(boogieVar.Name, boogieVar.TypedIdent.Type);
+ if (boogieVar is Constant)
+ res = new VCExprConstant(boogieVar.Name, boogieVar.TypedIdent.Type);
+ else
+ res = new VCExprVar(boogieVar.Name, boogieVar.TypedIdent.Type);
UnboundVariables.Bind(boogieVar, res);
}
return cce.NonNull(res);
diff --git a/Source/VCExpr/VCExprAST.cs b/Source/VCExpr/VCExprAST.cs index 82bdebbe..f56b6978 100644 --- a/Source/VCExpr/VCExprAST.cs +++ b/Source/VCExpr/VCExprAST.cs @@ -1868,6 +1868,14 @@ namespace Microsoft.Boogie.VCExprAST { }
}
+ public class VCExprConstant : VCExprVar
+ {
+ internal VCExprConstant(string name, Type type) : base(name,type) {
+ Contract.Requires(type != null);
+ Contract.Requires(name != null);
+ }
+ }
+
public abstract class VCExprBinder : VCExpr {
public readonly VCExpr/*!*/ Body;
public readonly List<TypeVariable/*!*/>/*!*/ TypeParameters;
|