title: Is there any tool that can analyze the dependencies between variables in c# programs?
body: <p>There are many tools that we can use to show the dependencies between modules, source code files, classes, or functions etc. But there seems no tool for analyzing the dependencies between variables. Given a dependency graph of variables would be helpful for understanding and refactoring the code.</p>
  
  <p>For example, if variable b is only used for calculating the value of variable c as follows:</p>
  
  <pre><code>b = a;
  ....
  c = b + 2;
  </code></pre>
  
  <p>Maybe we could remove variable b to make the code more readable:</p>
  
  <pre><code>....
  c = a + 2;
  </code></pre>
  
  <p>This kind of refactory may be hard if the code is very complex or has many bad smells.</p>
  
  <p>Is there any tool that can analyze the dependencies between variables in c# or other programming languages?</p>