llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.66k stars 11.85k forks source link

[llvm-cov][MC/DC][Qualification] MCDC coverage does not work for negation of (sub-)terms like “(!(v0 && v1))” #113435

Open escherle-validas opened 1 day ago

escherle-validas commented 1 day ago

Criticality: HIGH During qualification of MCDC coverage at Validas we found that In the following example the term “(!(v0 && v1))” is not evaluated correctly. We observed that the expected results are wrongly computed in the test vector line, for example v0=T, v1=T the expected result should be F but is compouted to T

grafik

This is confusing, since other terms like (v0 && (v1 || v2)) and ((v0 && v1) || v2)) are evaluated correctly.

evodius96 commented 1 day ago

Just to note that again the analysis is looking past the logical-NOT as simplistic and focusing on the containing Boolean expression. It states the boundaries of the region it is analyzing:

MC/DC Decision Region (24:10) to (24:18)

Which includes (v0&&v1). The analysis is correct for this region, it's just that the negation is not included. I know your assertion is that it should be.