diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2016-06-05 15:03:09 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2016-06-05 15:03:09 -0400 |
commit | 618f037a466cd4392be6e1f4b20e248d58447456 (patch) | |
tree | 3c0b51de79e3537d3e94c8f1cca46f32d9a4b974 /Source/Core/AbsyCmd.cs | |
parent | 636108e4c302a24ed658b5f09812010b30e36e95 (diff) | |
parent | 41082463d783d6f8d8a5aaf69bf459b57bca6000 (diff) |
Merge branch 'dfsg_free'
Diffstat (limited to 'Source/Core/AbsyCmd.cs')
-rw-r--r-- | Source/Core/AbsyCmd.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/Core/AbsyCmd.cs b/Source/Core/AbsyCmd.cs index 404945a9..2e33e1dd 100644 --- a/Source/Core/AbsyCmd.cs +++ b/Source/Core/AbsyCmd.cs @@ -2463,6 +2463,12 @@ namespace Microsoft.Boogie { } finally { rc.TypeBinderState = previousTypeBinderState; } + + var id = QKeyValue.FindStringAttribute(Attributes, "id"); + if (id != null) + { + rc.AddStatementId(tok, id); + } } public override void AddAssignedVariables(List<Variable> vars) { @@ -2890,6 +2896,12 @@ namespace Microsoft.Boogie { public override void Resolve(ResolutionContext rc) { //Contract.Requires(rc != null); Expr.Resolve(rc); + + var id = QKeyValue.FindStringAttribute(Attributes, "id"); + if (id != null) + { + rc.AddStatementId(tok, id); + } } public override void AddAssignedVariables(List<Variable> vars) { //Contract.Requires(vars != null); @@ -3206,8 +3218,14 @@ namespace Microsoft.Boogie { this.Expr.Emit(stream); stream.WriteLine(";"); } + public override void Resolve(ResolutionContext rc) { + //Contract.Requires(rc != null); + ResolveAttributes(Attributes, rc); + base.Resolve(rc); + } public override void Typecheck(TypecheckingContext tc) { //Contract.Requires(tc != null); + TypecheckAttributes(Attributes, tc); Expr.Typecheck(tc); Contract.Assert(Expr.Type != null); // follows from Expr.Typecheck postcondition if (!Expr.Type.Unify(Type.Bool)) { |