diff options
author | Unknown <afd@afd-THINK.home> | 2012-12-20 09:24:02 +0000 |
---|---|---|
committer | Unknown <afd@afd-THINK.home> | 2012-12-20 09:24:02 +0000 |
commit | 23471ff664051f15faee787eb25ca72b74acfab5 (patch) | |
tree | f36a65782cc7efc9a19002e26d4849caf751896c /Source/Predication | |
parent | 66931c81ab8871dab357d01448ef1c9dec0b53fd (diff) |
Support for "do_not_predicate" in predication of requires and ensures
Diffstat (limited to 'Source/Predication')
-rw-r--r-- | Source/Predication/SmartBlockPredicator.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Predication/SmartBlockPredicator.cs b/Source/Predication/SmartBlockPredicator.cs index 2150f72d..834099ff 100644 --- a/Source/Predication/SmartBlockPredicator.cs +++ b/Source/Predication/SmartBlockPredicator.cs @@ -494,11 +494,18 @@ public class SmartBlockPredicator { .ToArray());
if (impl == null) {
+ var fpIdentifierExpr = new IdentifierExpr(Token.NoToken, fpVar);
foreach (Requires r in proc.Requires) {
- new EnabledReplacementVisitor(new IdentifierExpr(Token.NoToken, fpVar)).VisitExpr(r.Condition);
+ new EnabledReplacementVisitor(fpIdentifierExpr).VisitExpr(r.Condition);
+ if (!QKeyValue.FindBoolAttribute(r.Attributes, "do_not_predicate")) {
+ r.Condition = Expr.Imp(fpIdentifierExpr, r.Condition);
+ }
}
foreach (Ensures e in proc.Ensures) {
new EnabledReplacementVisitor(new IdentifierExpr(Token.NoToken, fpVar)).VisitExpr(e.Condition);
+ if (!QKeyValue.FindBoolAttribute(e.Attributes, "do_not_predicate")) {
+ e.Condition = Expr.Imp(fpIdentifierExpr, e.Condition);
+ }
}
}
}
|