Code Monkey home page Code Monkey logo

ginn's Introduction

Graph Interval Neural Network (GINN)

This repository provides the implementation of the graph models proposed in our paper.

The key idea of GINN is to streamline the message-passing procedure based on intervals of control flow graphs. In that sense, the design can be seamlessly incorporated into any graph-based models for learning embeddings of source code. We give two specific instances: GINN and GINN-based RNN Sandwich.

Install

Prerequisites

  • Python 3

  • pip install -r requirements.txt

Models

  1. GGNN-based model: in models/GGNN.py

  2. GINN model: in models/GINN.py

Test the models

We have provided sample files to test both models (in data). The format of the sample files are explained in data/README.md

Give command like below for running the models:

cd models
python GGNN.py --config-file config/config-simple-AST.json
python GINN.py --config-file config/config-simple-interval.json

Here are the screenshots of the two models.

GINN

GGNN

Generaing Intervals

We provide an interval generator here. The generator parses Java files to CFGs, ASTs and intervals by Spoon.

Docker Container Setup

Change directories into the one with Dockerfile, run the folllowing commands, and follows command in Test the models:

docker build --tag ginn:1.0 .
docker run -it ginn:1.0 /bin/bash

ginn's People

Contributors

ginn-imp avatar

Watchers

James Cloos 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.