tum-i4 / macke-vulnerability-assessment

1 stars 1 forks source link

Additional node attributes ideas #3

Closed saahil closed 6 years ago

saahil commented 6 years ago
saahil commented 6 years ago

Good arguments against McCabe complexity as a measure of real complexity.

For now, replace it by simply -

  1. [x] # of if statements
  2. [x] # of loops (for + while)
saahil commented 6 years ago

pycparser to get FuncDef node. Purpose -

  1. Get clean function size.
  2. Count how many incoming parameters are potentially allocated on the heap.
saahil commented 6 years ago

Approximating complexity by counting the number of conditionals and loops in the function. Good article on why McCabe's cyclomatic complexity is a bit of an overkill.

May also make sense to count the max nesting level?

saahil commented 6 years ago

We are already including the number of errors found by Macke. It might obviate the need for including the number of dereferencing instructions. Proceeding without it now.