CS FundamentalsVery hardGATE CS · Product-company placement

A static analyser is described as SOUND for null-pointer dereferences. What does that guarantee?

  1. A. It never reports a warning for code that cannot actually dereference null
  2. B. It reports every possible null dereference, possibly with some false alarms
  3. C. It reports exactly the real null dereferences, no more and no less
  4. D. It proves that the program terminates

Correct answer: B. It reports every possible null dereference, possibly with some false alarms

Sound means no false negatives: if a dereference can fail, it is flagged, so the tool may over-approximate and raise false positives. Doing both (sound and complete) is impossible in general by Rice's theorem.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic