pascal-lab/Tai-e

Pointer Analysis for Specific Elements in JAR Files and Execution Time Tracking

Closed this issue · 1 comments

Hello,

I am currently engaged in a project that requires performing pointer analysis on a JAR file, with an emphasis on monitoring the execution time for specific elements, such as a certain class, package, or method.

Here are my inquiries:

  1. Can pointer analysis be applied to a JAR file to selectively target a particular class, package, or method?
  2. In achieving this, is it sufficient to utilize command-line configurations, or is it necessary to modify the source code of the pointer analysis framework?
  3. Which tools or techniques would you suggest for accurately tracking the execution time of these specific elements?
  4. What are the potential limitations or important considerations to keep in mind while gathering timing statistics in this context?

I am seeking advice or recommendations on the most effective strategy to undertake this analysis. Any assistance or pointers towards useful resources would be immensely helpful.

I appreciate your time and help in this matter.

Best regards,
Tengjie Lin

  1. Can pointer analysis be applied to a JAR file to selectively target a particular class, package, or method?

Try modifying this to ignore the method that does not need to be analyzed:

private boolean isIgnored(JMethod method) {
return ignoredMethods.contains(method) ||
onlyApp && !method.isApplication();
}

  1. In achieving this, is it sufficient to utilize command-line configurations, or is it necessary to modify the source code of the pointer analysis framework?

If you really don't want to modify the source code, try to prune the Jar file by deleting the some .class files that does not need to be analyzed; Keep in mind that this may cause the reference analysis to not locate the target, so you will need to enable the --allow-phantom option.

  1. Which tools or techniques would you suggest for accurately tracking the execution time of these specific elements?

It is straightforward to record the number of executions using our Profiler plugin (some modifications may be required), but tracking the execution time is a bit more different. If you are keen on recording execution times, you might consider making direct modifications to the core of the pointer analysis, specifically the DefaultSolver.

  1. What are the potential limitations or important considerations to keep in mind while gathering timing statistics in this context?

The time taken to analyze a single part (a particular class, package, or method) of program can be greatly affected by the rest of the program, and neglecting to analyse the rest of the program does not mean that the single part will remain the same.