FlowDroid icon indicating copy to clipboard operation
FlowDroid copied to clipboard

Sparse Analysis Optimization Of Low Code Intrusion

Open notify-bibi opened this issue 2 years ago • 2 comments

SparseIFDS

Can improve speed and reduce memory usage. ( Be able to reduce propgeate edges by 20 times

Now this optimization will cause some test cases to fail and is still being resolved

[ERROR]   ImplicitFlowTests>ImplicitFlowTests.userCodeTest2:667->JUnitTests.negativeCheckInfoflow:146 expected:<0> but was:<1>
[ERROR]   ImplicitFlowTests>ImplicitFlowTests.implicitFlowTaintWrapperNegativeTest:483->JUnitTests.negativeCheckInfoflow:146 expected:<0> but was:<1>
[ERROR]   ImplicitFlowTests>ImplicitFlowTests.userCodeTest1:654->JUnitTests.negativeCheckInfoflow:146 expected:<0> but was:<1>
[ERROR]   ImplicitFlowTests>ImplicitFlowTests.classTypeTest:583->JUnitTests.checkInfoflow:124 expected:<1> but was:<0>
[ERROR]   ImplicitFlowTests>ImplicitFlowTests.switchTest:85->JUnitTests.checkInfoflow:124 expected:<1> but was:<0>
[ERROR]   ImplicitFlowTests>ImplicitFlowTests.arrayIndexTest1:620->JUnitTests.checkInfoflow:124 expected:<1> but was:<0>
[ERROR]   ImplicitFlowTests>ImplicitFlowTests.conditionalAliasingTest2:516->JUnitTests.negativeCheckInfoflow:146 expected:<0> but was:<1>
[ERROR]   ImplicitFlowTests>ImplicitFlowTests.afterCallNegativeTest:550->JUnitTests.negativeCheckInfoflow:146 expected:<0> but was:<1>

notify-bibi avatar May 03 '23 04:05 notify-bibi

If you can ensure that all test cases still work with your optimization and can show a significant speedup, that would be greatly appreciated. Please provide precise data on your measurements, i.e., on which apps with which configuration you tested.

Concerning the implicit flows, you could propgate them non-sparse. Since these are control-flow dependencies, a lot of locals will be tainted anyway, so I guess you won't see much of a speedup there with a sparse propagation. It would then maybe make sense to distinguish between explicit flows (wich you propagate through a sparse graph) and implicit flows (which you propgate as normal). That would also resolve the correctness issues from the test cases.

StevenArzt avatar May 03 '23 09:05 StevenArzt

Thanks for the technical reminder, I'll get these things done quickly

notify-bibi avatar May 04 '23 03:05 notify-bibi