diff options
author | qadeer <unknown> | 2014-01-07 15:43:20 -0800 |
---|---|---|
committer | qadeer <unknown> | 2014-01-07 15:43:20 -0800 |
commit | 37fcf1a2d36dcbb70ccb52e7a925a52c4fce67d0 (patch) | |
tree | 6bd8ed83b642c27ded70c36a3b6e1e40b1205abd /Source/Concurrency/Program.cs | |
parent | 0ef68160d1c969c866f8ada83f35bb43f7faa188 (diff) |
first cut of refinement checking
Diffstat (limited to 'Source/Concurrency/Program.cs')
-rw-r--r-- | Source/Concurrency/Program.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/Concurrency/Program.cs b/Source/Concurrency/Program.cs index 7c2c0c74..45d538df 100644 --- a/Source/Concurrency/Program.cs +++ b/Source/Concurrency/Program.cs @@ -33,8 +33,21 @@ namespace Microsoft.Boogie List<Declaration> decls = new List<Declaration>();
OwickiGries.AddCheckers(linearTypeChecker, moverTypeChecker, decls);
MoverCheck.AddCheckers(linearTypeChecker, moverTypeChecker, decls);
- //RefinementCheck.AddCheckers(linearTypeChecker, moverTypeChecker, decls);
+ foreach (Declaration decl in decls)
+ {
+ Procedure proc = decl as Procedure;
+ if (proc != null && QKeyValue.FindBoolAttribute(proc.Attributes, "yields"))
+ {
+ proc.Modifies = new List<IdentifierExpr>();
+ linearTypeChecker.program.GlobalVariables().Iter(x => proc.Modifies.Add(Expr.Ident(x)));
+ }
+ }
+ foreach (Declaration decl in decls)
+ {
+ decl.Attributes = OwickiGries.RemoveYieldsAttribute(decl.Attributes);
+ decl.Attributes = OwickiGries.RemoveStableAttribute(decl.Attributes);
+ }
program.TopLevelDeclarations.RemoveAll(x => originalDecls.Contains(x));
program.TopLevelDeclarations.AddRange(decls);
}
|