statycc / pymwp

A static analyzer of variable value growth for C programs.
https://statycc.github.io/pymwp/
GNU General Public License v3.0
4 stars 1 forks source link

Weird analysis behavior #149

Open nkrusch opened 11 hours ago

nkrusch commented 11 hours ago
int main(int a, int b, int p, int q, int q_) {
  while (true) {
            a = a + 1;
            b = b + 1;
            q_ = a + b;
            q_ = q_ + 1;
            q_ = q_ * p;
            // q = q + q_;
  }
}

With the last line commented out vs. last line included, the second case takes 10x longer to run the analysis. I would like to understand why. Not sure if this is machine-specific.

The second case is infinite, but there are similar examples without infinity, so that should be irrelevant. It may be something stupid, like "copying lists in Python", but in any case looking for this kind of explanation.