-
Hi again! I've continued working with BA-DUA for my project and I'm very happy with it, but I did realize there are two issues, namely that DUAs within one basic block are not tracked, and that DUAs that trigger an exception aren't marked as covered. I did some research before coming here, and from the description in your original paper on BA-DUA (An efficient bitwise algorithm for intra-procedural data-flow testing coverage), it seems that only DUAs with a path from the def basic block and the use basic block are tracked. I'm curious as to why this is so? Was this purely a design choice, or was there another reason? I feel that tracking DUAs in the same basic block would add more information, such as in the worked example in your paper, where the faulty data-flow is the def and use of The other issue, which the Jaguar paper also mentions, is exceptions. This feels like a more tricky issue to solve, but I would also appreciate advice if you have any. Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
Okay let me try to respond these tricky questions. Let me start with the easiest ones: local DUAs.
This is true!
This was by design. But why? Because we don't need to track each individual DUA and because local DUA a trivial to track.
Definitely true
This is basically why I said they are trivial to track. Assuming that all instructions of a basic block are always executed given the first instructions is reach, to track local DUAs we just need to track if the basic block was reach, reducing the problem to control-flow coverage. But due to exception flow, this assumptions could not be held. We are also studying DUAs subsumption. A global DUA can subsumes a local DUA. So no need to track each individual local DUA.
We didn't implemented support for local DUAs. As I said before, this was a design choice, but maybe, in the future, we will include this on BA-DUA. If you want to implement it, my suggestions is to track which basic blocks were covered, and then on report phase, detect witch local DUAs were covered by simply verifying local DUAs within a basic block. As always, contributions are welcome, I'll be happy to review this if you open a merge request to BA-DUA repository. Regarding exceptions, they are more tricky, I'll need some time to elaborate a more complete response, but we already support them somehow (in an optimistic way). In the meanwhile you can review BA-DUA's validation tests on exceptions: [1], [2], [3] and [4]. |
Beta Was this translation helpful? Give feedback.
-
I did a POC a long time ago to support local duas (https://github.com/saeg/ba-dua/tree/local-duas). But I was not happy with the code, so I didn't integrate it to mainline. |
Beta Was this translation helpful? Give feedback.
-
So, just to be clear, since BA-DUA monitor the DUAs on an optimistic way, in case of exceptions, some DUAs that were not covered may be marked as covered. |
Beta Was this translation helpful? Give feedback.
Okay let me try to respond these tricky questions.
Let me start with the easiest ones: local DUAs.
This is true!
This was by design. But why? Because we don't need to track each individual DUA and because local DUA a trivial to track.
Definitely true