CS FundamentalsVery hardGATE CS · Product-company placement
A static analyser is described as SOUND for null-pointer dereferences. What does that guarantee?
- A. It never reports a warning for code that cannot actually dereference null
- B. It reports every possible null dereference, possibly with some false alarms
- C. It reports exactly the real null dereferences, no more and no less
- 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.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A three-way merge compares five separate regions of a file. Base / ours / theirs: R1 a / a / a; R2 b / B1 / b; R3 c / c / C2; R4 d / D1 /…
- A project uses Conventional Commits with automated semantic versioning. Since v1.4.2 the commits are 'fix(api): handle empty body'…
- A team lead says: 'We know this shortcut will hurt later, but we must ship for the demo and will pay it back next sprint.' In Fowler's…
- A bank must replace a large legacy system without a risky big-bang cut-over. It puts a routing façade in front of it, moves one capability…
- A service calls three downstream APIs using one shared pool of 200 threads. When one API becomes very slow, all 200 threads end up waiting…
- In STRIDE threat modelling, a user denies having approved a large transfer, and the system cannot prove otherwise. Which threat is this…