diff options
author | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-08-19 10:51:44 -0700 |
---|---|---|
committer | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-08-19 10:51:44 -0700 |
commit | 674e30357980e1192ac532f4bd16c529cedc7fdc (patch) | |
tree | 583d3eca7e0d40bb4753f25d4dbb3069e3dea9b5 /Source/Dafny/Translator.cs | |
parent | 8a0df70ffb8d57d1bd210ce2e1c9522ba0967365 (diff) |
Draft out a more advanced version of trigger generation
This new version will include a cleaner pipeline, and trigger splitting.
Diffstat (limited to 'Source/Dafny/Translator.cs')
-rw-r--r-- | Source/Dafny/Translator.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Dafny/Translator.cs b/Source/Dafny/Translator.cs index 039aa56f..b5d89abd 100644 --- a/Source/Dafny/Translator.cs +++ b/Source/Dafny/Translator.cs @@ -12895,6 +12895,8 @@ namespace Microsoft.Dafny { // that needed to be proved about the function was proved already in the previous module, even without the body definition).
} else if (!FunctionBodyIsAvailable(f, currentModule)) {
// Don't inline opaque functions or foreign protected functions
+ } else if (Attributes.Contains(f.Attributes, "no_inline")) {
+ // User manually prevented inlining
} else if (CanSafelyInline(fexp, f)) {
// inline this body
var body = GetSubstitutedBody(fexp, f, false);
@@ -13106,7 +13108,7 @@ namespace Microsoft.Dafny { }
private bool CanSafelySubstitute(ISet<IVariable> protectedVariables, IVariable variable, Expression substitution) {
- return !(protectedVariables.Contains(variable) && TriggerGenerator.IsTriggerKiller(substitution));
+ return !(protectedVariables.Contains(variable) && Dafny.Triggers.TriggersCollector.IsTriggerKiller(substitution));
}
private class VariablesCollector: BottomUpVisitor {
|