-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to dump call graph, pointer flow graph, and points-to set? #111
Comments
Could you specify which details you would like to include in the
Additionally, we highly recommend using the latest version of Tai-e ( |
Call Graph and constraint graph |
If you want to dump Call Graph to disk, please refer to this comment: #112 (comment). Regarding the constraint graph, are you referring to constraints such as the statement |
Yes that's the constraint graph |
And also can you help me on how to dump points-to set of all variables ? |
Currently, Tai-e does not support dumping the PointerFlowGraph using the existing options. However, you can achieve this manually according to the following example: public static void main(String[] args) throws Exception {
pascal.taie.Main.main(
"-pp",
"-cp", "src/test/resources/pta/basic",
"-m", "New",
"-a", "pta=implicit-entries:false;only-app:true;dump:true;"
);
// access PointerFlowGraph through reflection as it is not publicly exposed now
PointerAnalysisResult result = World.get().getResult(PointerAnalysis.ID);
Field pfgField = Class.forName("pascal.taie.analysis.pta.PointerAnalysisResultImpl")
.getDeclaredField("pfg");
pfgField.setAccessible(true);
PointerFlowGraph pfg = (PointerFlowGraph) pfgField.get(result);
// dump the PointerFlowGraph
new DotDumper().dump(pfg, new File(World.get().getOptions()
.getOutputDir(), "pfg.dot"));
}
To do this, use the following option: "-a", "pta=dump:true;" (-a "pta=dump:true;") For more details, refer to the Tai-e documentation on specific analysis options. The relevant Tai-e/src/main/resources/tai-e-analyses.yml Lines 23 to 25 in af7ae19
|
Thank you very much for your patience. It helped me a lot. |
Running Zipper and dumping constraint graph, call graph, points to set - all are not working at same time.
When I run this command, the flag to dump constraint graph, call graph and points-to-set are overriding the flag to run zipper, so the zipper is not able to run. The output when the run the above command is
When I run only zipper i.e., we can see the zipper is working
Could you help with this issue so that we can use the flags of |
Try merging the options like |
Even I tried that and only-app , dump are not working when I tried merging the options, the output is
|
I have no idea according to the provided information. Please provide a reproducible example to demonstrate the issue, via File Upload or GitHub Repository. So that I can directly help you debug it. |
Overall Description
Hello sir,
We have been using Tai-e and tried running the command to generate a .dot file. Here is the original command we used:
java -cp tai-e-all.jar pascal.taie.Main -cp foo.jar;bar.jar -m baz.Main -java 8 -a pta=cs:2-type;time-limit:60
For our project, we modified the command as follows:
java -cp tai-e-all-0.2.2.jar pascal.taie.Main -cp Person1.jar -m Person -java 8 -a pta=advanced:zipper-e;dump:true
the output is
8 -a pta=advanced:zipper-e;dump:true
Tai-e starts ...
Output directory: /home/koushik/O2PTA/tests/zipper_direct_flow/output
Writing options to /home/koushik/O2PTA/tests/zipper_direct_flow/output/options.yml
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Writing log to /home/koushik/O2PTA/tests/zipper_direct_flow/output/tai-e.log
Writing analysis plan to /home/koushik/O2PTA/tests/zipper_direct_flow/output/tai-e-plan.yml
WorldBuilder starts ...
6699 classes with 64241 methods in the world
WorldBuilder finishes, elapsed time: 4.24s
pta starts ...
[Pointer analysis] elapsed time: 23.21s
-------------- Pointer analysis statistics: --------------
#var pointers: 5,7955 (insens) / 5,7955 (sens)
#objects: 6380 (insens) / 6380 (sens)
#var points-to: 386,4368 (insens) / 386,4368 (sens)
#static field points-to: 8396 (sens)
#instance field points-to: 83,4823 (sens)
#array points-to: 16,3107 (sens)
#reachable methods: 8307 (insens) / 8307 (sens)
#call graph edges: 4,5913 (insens) / 4,5913 (sens)
Zipper starts ...
Building OAG starts ...
Building OAG finishes, elapsed time: 0.82s
Building PCE starts ...
Building PCE finishes, elapsed time: 0.61s
68881 nodes in OFG
215102 edges in OFG
Building and analyzing PFG starts ...
Building and analyzing PFG finishes, elapsed time: 2.09s
#types: 1092
#avg. nodes in PFG: 439
#avg. edges in PFG: 1248
#precision-critical methods: 1522
Zipper finishes, elapsed time: 4.13s
[Pointer analysis] elapsed time: 3.69s
-------------- Pointer analysis statistics: --------------
#var pointers: 5,7955 (insens) / 5,7955 (sens)
#objects: 6380 (insens) / 6380 (sens)
#var points-to: 386,4368 (insens) / 386,4368 (sens)
#static field points-to: 8396 (sens)
#instance field points-to: 83,4823 (sens)
#array points-to: 16,3107 (sens)
#reachable methods: 8307 (insens) / 8307 (sens)
#call graph edges: 4,5913 (insens) / 4,5913 (sens)
pta finishes, elapsed time: 33.43s
Tai-e finishes, elapsed time: 38.02s
dump:true: command not found
Thank you for your assistance.
Best regards, Koushik Reddy Kambham
Expected Behavior
In the output folder, we found .yml files instead of the expected .dot files. Could you please guide us on how to generate the .dot file using Tai-e?
Current Behavior
In the output folder, we found .yml files instead of the expected .dot files. Could you please guide us on how to generate the .dot file using Tai-e?
Tai-e Arguments
Click here to see Tai-e Options
{{The content of 'output/options.yml' file}}
Click here to see Tai-e Analysis Plan
{{The content of 'output/tai-e-plan.yml' file}}
For our project, we modified the command as follows:
java -cp tai-e-all-0.2.2.jar pascal.taie.Main -cp Person1.jar -m Person -java 8 -a pta=advanced:zipper-e;dump:true
Tai-e Log
Click here to see Tai-e Log
For our project, we modified the command as follows:
java -cp tai-e-all-0.2.2.jar pascal.taie.Main -cp Person1.jar -m Person -java 8 -a pta=advanced:zipper-e;dump:true
Additional Information
No response
The text was updated successfully, but these errors were encountered: