[Soot-list] Inserting RuntimeVisibleTypeAnnotations using Soot

Shreyansh Kulshreshtha b17062 at students.iitmandi.ac.in
Thu Mar 4 04:20:10 EST 2021


Dear All

I am working on a project in which I have to insert certain annotations
using soot similar to the one in
https://github.com/beehive-lab/TornadoVM/blob/master/examples/src/main/java/uk/ac/manchester/tornado/examples/Saxpy.java.

> for (@Parallel int i = 0; i < y.length; i++) {
>             y[i] = alpha * x[i];
> }
>

I checked the .class file for the representation of annotations in the
bytecode using javap and found the following in the saxpy function.
RuntimeVisibleTypeAnnotations:
        0: #52(): LOCAL_VARIABLE, {start_pc=14, length=27, index=5}
          uk.ac.manchester.tornado.api.annotations.Parallel

But on using method.getTags() ,I am only getting the name of the annotation
(VisibilityLocalVariableAnnotationTag), but no other information is visible
there.

Can you please help me read these annotations as well as insert them using
soot?

-- 
Regards

Shreyansh Kulshreshtha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20210304/ff626bb0/attachment.html>


More information about the Soot-list mailing list