themaplelab / averroes

Java bytecode generator for sound and precise partial program analysis
Eclipse Public License 2.0
23 stars 7 forks source link

Inner classes and methods are skipped in the creation of the organized-app jar #20

Open akshayutture opened 3 years ago

akshayutture commented 3 years ago

Inner classes and methods seem to be skipped in the generation of the organized-app jar.

Here is one such benchmark https://drive.google.com/file/d/1Kh745K4TITZ0LSsEeTb98ydEw8tqw5Jd/view?usp=sharing

Here is the corresponding organized app-jar https://drive.google.com/file/d/1BcnwufB2pjjHB4BFYzKrQDZyDSQZjqxQ/view?usp=sharing

This inner class is missing: simulation.global.EventsQueue.Node This inner method is missing: simulation.queue.UniformServer$1.execute()

Here is the command used to run Averroes

java -jar averroes/build/libs/averroes-all-1.0-SNAPSHOT.jar -a urlc4364d0d12_ahmedelmorsy_cafetria_simulation_tgz-pJ8-main_MainJ8/jarfile/urlc4364d0d12_ahmedelmorsy_cafetria_simulation_tgz-pJ8-main_MainJ8.jar -j /usr/lib/jvm/java-8-openjdk-amd64/jre -o output -m main.Main -r "main.ExponentialGenereationDemo:main.Main:main.Simulation:main.Simulation$1:main.Simulation$2:main.Simulation$JoiningCashierEvent:main.Simulation$JoiningCashierEvent$1:simulation.global.Const:simulation.global.Event:simulation.global.EventsQueue:simulation.global.EventsQueue$1:simulation.global.EventsQueue$Node:simulation.global.SimulationClk:simulation.global.Statistics:simulation.global.Statistics$1:simulation.global.Statistics$Delay:simulation.global.Statistics$QueueInfo:simulation.logging.ConsoleLogger:simulation.logging.EventsLogger:simulation.logging.FileLogger:simulation.queue.CustomServer:simulation.queue.CustomServer$1:simulation.queue.Customer:simulation.queue.InfServersQueueSystem:simulation.queue.QueueSystem:simulation.queue.QueueSystem$QueueEntry:simulation.queue.Server:simulation.queue.UniformServer:simulation.queue.UniformServer$1:simulation.random.ExponentialRandom"
akshayutture commented 3 years ago

Or else, a simpler example is this

import java.util.*;

public class C{
        public static class B implements Comparable<B>{
                @Override
                public int compareTo(B st){
                        return 0;
                }
        }

        public static void main(String[] args){
                ArrayList<B> arr = new ArrayList<B>();
                arr.add(new B());
                arr.add(new B());
                Collections.sort(arr);
        }
}

The inner class B gets left out of 'organized-app.jar'.

karimhamdanali commented 3 years ago

I feel this issues is related to #21 as well. I'll keep you posted when I start looking into both.