diff options
author | qadeer <qadeer@microsoft.com> | 2011-09-13 21:02:16 -0700 |
---|---|---|
committer | qadeer <qadeer@microsoft.com> | 2011-09-13 21:02:16 -0700 |
commit | 558a9ce363846c80f14a5f2fb1f97ad2355e102a (patch) | |
tree | 78c1ec8d0fbf79d8e871f2eff156f011ca1955c8 | |
parent | a65934dec9e0d859bc58b33acf663d45e9dfbc96 (diff) |
fixed bug in data value generation
-rw-r--r-- | Source/VCGeneration/StratifiedVC.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/VCGeneration/StratifiedVC.cs b/Source/VCGeneration/StratifiedVC.cs index 243eb8e0..4533363f 100644 --- a/Source/VCGeneration/StratifiedVC.cs +++ b/Source/VCGeneration/StratifiedVC.cs @@ -2894,12 +2894,14 @@ namespace VC else {
if (candidateId != 0) {
Dictionary<VCExprVar, VCExpr> mapping = calls.id2Vars[candidateId];
- VCExpr e = mapping[vvar];
- if (e is VCExprLiteral) {
- VCExprLiteral lit = (VCExprLiteral)e;
- return m.MkElement(lit.ToString());
+ if (mapping.ContainsKey(vvar)) {
+ VCExpr e = mapping[vvar];
+ if (e is VCExprLiteral) {
+ VCExprLiteral lit = (VCExprLiteral)e;
+ return m.MkElement(lit.ToString());
+ }
+ vvar = (VCExprVar)mapping[vvar];
}
- vvar = (VCExprVar) mapping[vvar];
}
uniqueName = context.Lookup(vvar);
}
|