summaryrefslogtreecommitdiff
path: root/Source/Core/VariableDependenceAnalyser.cs
diff options
context:
space:
mode:
authorGravatar allydonaldson <unknown>2013-06-07 16:59:39 +0100
committerGravatar allydonaldson <unknown>2013-06-07 16:59:39 +0100
commit8cd9a8f63d7b13281e76ffcdd255842de977bb23 (patch)
tree832a97a6b319861119c74f05224b7bbc463292fe /Source/Core/VariableDependenceAnalyser.cs
parent3b0b6a95957a01969a85ab0b3e98de350247e0c6 (diff)
Some work on staged Houdini
Diffstat (limited to 'Source/Core/VariableDependenceAnalyser.cs')
-rw-r--r--Source/Core/VariableDependenceAnalyser.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/Core/VariableDependenceAnalyser.cs b/Source/Core/VariableDependenceAnalyser.cs
index e48ec90f..799a60de 100644
--- a/Source/Core/VariableDependenceAnalyser.cs
+++ b/Source/Core/VariableDependenceAnalyser.cs
@@ -17,6 +17,7 @@ namespace Microsoft.Boogie {
void dump();
void ShowDependencyChain(VariableDescriptor source, VariableDescriptor target);
bool VariableRelevantToAnalysis(Variable v, string proc);
+ bool Ignoring(Variable v, string proc);
}
@@ -380,27 +381,28 @@ namespace Microsoft.Boogie {
private HashSet<VariableDescriptor> IgnoredVariables = null;
- public bool VariableRelevantToAnalysis(Variable v, string proc) {
- if (v is Constant) {
- return false;
- }
+ public bool Ignoring(Variable v, string proc) {
if (IgnoredVariables == null) {
MakeIgnoreList();
}
if(proc != null && IgnoredVariables.Contains(new LocalDescriptor(proc, v.Name))) {
- return false;
+ return true;
}
if(IgnoredVariables.Contains(new GlobalDescriptor(v.Name))) {
- return false;
+ return true;
}
- return true;
+ return false;
}
+ public bool VariableRelevantToAnalysis(Variable v, string proc) {
+ return !(v is Constant || Ignoring(v, proc));
+ }
+
private void MakeIgnoreList()
{
IgnoredVariables = new HashSet<VariableDescriptor>();