summaryrefslogtreecommitdiff
path: root/Source/Concurrency/Program.cs
diff options
context:
space:
mode:
authorGravatar qadeer <unknown>2014-01-07 15:43:20 -0800
committerGravatar qadeer <unknown>2014-01-07 15:43:20 -0800
commit37fcf1a2d36dcbb70ccb52e7a925a52c4fce67d0 (patch)
tree6bd8ed83b642c27ded70c36a3b6e1e40b1205abd /Source/Concurrency/Program.cs
parent0ef68160d1c969c866f8ada83f35bb43f7faa188 (diff)
first cut of refinement checking
Diffstat (limited to 'Source/Concurrency/Program.cs')
-rw-r--r--Source/Concurrency/Program.cs15
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);
}