pascal-lab/Tai-e

How could I add multiple entrypoints?

Closed this issue · 2 comments

Hello everyone. I have a question about building ICFG. WALA has a class AllApplicationEntrypoints that Call Graph can be constructed more accurately with all application entrypoints. But in Tai-e, it seems like the main class should only be specified as a single entrypoint with the option -m.

it seems like the main class should only be specified as a single entrypoint with the option -m.

As we discussed, there is only one main method in general Java program (so -m is an alias of --main-class but not --main-classes in Tai-e options). But in other scenarios, multiple entrypoints may be required, e.g., JUnit test entries.

If you want to add multiple entrypoints (which will also be the entries of call graph and ICFG) in Tai-e, refer to the class pascal.taie.analysis.pta.core.solver.EntryPoint and method pascal.taie.analysis.pta.core.solver.Solver#addEntryPoint (you can call it in the plugin you write).

Some usages:

If you want to add multiple entrypoints (which will also be the entries of call graph and ICFG) in Tai-e, refer to the class pascal.taie.analysis.pta.core.solver.EntryPoint and method pascal.taie.analysis.pta.core.solver.Solver#addEntryPoint (you can call it in the plugin you write).

I successfully add all entrypoints I want through my plugin, but every single pointer analysis takes a really long time. Thanks a lot!