Giter Club home page Giter Club logo

enre's Introduction

ENRE

Build Status

ENRE (ENtity Relationship Extractor ) is a tool for extraction of code entity dependencies(relationships) from source code. The resolved dependency types include:

Dependency Type Description
Import a File imports a Package, Module, etc.
Implement A Class implements an Interface.
Extend A Class inherits a Class.
Call A function/Method calls A Function/method.
Use A Function/Method uses or reads a Variable.
Set A Function/Method uses or reads a Varibale.
Parameter A Funciton/Method has a Class type parameter.
Return A Function/Method returns a Class type value.

Features

ENRE supports analyzing source code written in Python, Go.

Usage

1)Prepare the executable jar

The released jar of ENRE is named as ENRE-v1.0.jar.

2) Set up Java environment

To execute ENRE-v1.0.jar, you should set up JAVA envionment. Please referer to Set up JAVA environment.

3) cmd usage

Now, everthing is already prepared well. Let's use ENRE to analyze source code. The usage command is:

java -jar <executable> <lang> <dir> <include-dir> <project-name>
  • . The executable jar package of ENRE.
  • . The language of source code that will be analyzed. It can be python or golang.
  • . The path of the source code that will be analyzed.
  • . The github url of source code. It only works when analyzing golang projects. Set it "null" when analyzing python projects.
  • . A short alias name of the anayzed source code project.

Example I:

Use ENRE to analyze a demo project "fire" written in Python:

#in linux platform 
$java -jar ENRE-v1.0.jar  python  demo-projects/fire   null  fire   
#in windows platform
$java -jar ENRE-v1.0.jar  python  demo-projects\fire   null  fire 

After analysis, ENRE finally outputs the resovled entities and dependencies in JSON, XML, DOT files in new-generated fire-out/ directory.

Example II:

Use ENRE to analyze a demo project "beego" written in Go:

#in linux platform 
$java -jar ENRE-v1.0.jar  golang  demo-projects/beego   github.com/astaxie/beego  beego  
#in windows platform
$java -jar ENRE-v1.0.jar  golang  demo-projects\beego   github.com/astaxie/beego  beego

After analysis, ENRE finally outputs the resovled entities and dependencies in JSON, XML, DOT files in new-generated beego-out/ directory.

[ENRE video introduction] (https://www.youtube.com/watch?v=BfXp5bb1yqc&t=43s)

License

MIT

enre's People

Contributors

jinwuxia avatar wj86 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.