Giter Site home page Giter Site logo

callgraph's Introduction

Call Graph

Introduction

The project aims to generate a call graph for Java JAR files or .class files using ASM. The call graph includes every call path from source to target, providing researchers with a lightweight tool to obtain a project's call graph. The project's call graph achieves the precision of Class Hierarchy Analysis (CHA).

How to Use

Install the Project

mvn clean package install

Import the Project

Firstly, import the project into your Java project using Maven. Add the following dependency to your pom.xml file:

<dependency>
    <groupId>xmu.lab</groupId>
    <artifactId>callGraph</artifactId>
    <version>0.0.2-SNAPSHOT</version>
</dependency>

Execute Call Graph Analysis

In your Java code, call the following method to perform call graph analysis:

        CallGraph callGraph = CallGraph.getInstance();
        ArrayList<String> jarPaths = new ArrayList<>();
        jarPaths.add(directoryUrl.getPath());
        callGraph.addPaths(jarPaths);
        callGraph.create();
        Set<MethodCall> methodCalls = callGraph.getMethodCalls();

Features

  • ASM Integration: Utilizes ASM to parse Java bytecode for accurate call graph generation.
  • CHA: Achieves the precision of Class Hierarchy Analysis for a comprehensive view of the project's dependencies.
  • Class and JAR Analysis: Supports the analysis of individual classes or entire JAR packages.

TODO

  • Optimization: Explore opportunities to enhance the performance and accuracy of call graph generation.
  • Documentation: Expand and improve project documentation for better usability.

callgraph's People

Contributors

wangcwangc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.