[Soot-list] Type Analysis in Soot

Nikhil cs16m028 at smail.iitm.ac.in
Tue Feb 13 02:59:22 EST 2018


          Hi,

I just started using soot. I want to know that whatever I am looking for is 
already there in soot?  

Consider the following example program.

class Example {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        List<Integer> l = null;

        // x will be in between 1 and 3 only.

        switch (x) {
            case 1:
                    l = new ArrayList<>();
                    break;
            case 2 : 
                    l = new LinkedList<>();
                    break;
            case 3 : 
                    l = new Vector<>();
                    break;
                }        
        
        //At this point l might take one of this [ArrayList, LinkedList, 
Vector]        
        //Is this any analysis in Soot to get the above information?
        
        ArrayList<Integer> al = new ArrayList<>();
        for (int i=0;i<4 ;i++ ) {
                al.add(i);
            }    
        l.addAll(al);        
        System.out.println(l);
    }
}




If some analysis is there, an explanation with a code will be very helpful.
Thanks in advance.

Cheers,
--Nikhil

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


More information about the Soot-list mailing list