Giter VIP home page Giter VIP logo

typilus's Introduction

Typilus + Graph generation

On top of Typilus, this repository can be used to generate augmented ASTs that were used in Typilus.

Graph generation

Graph structure

The graphs contain the following edges:

  • CHILD – AST edges
  • NEXT – edges connecting subsequent tokens in code
  • NEXT_USE – next usage of a variable
  • LAST_LEXICAL_USE – previous usage of a variable
  • OCCURRENCES_OF – edges between occurrences of the same variable
  • SUBTOKEN_OF – edges from subtokens to their origin
  • COMPUTED_FROM – edges that point to the origins of a variable
  • RETURNS_TO – edges from return/yield statements to the function definition

Currently, there are no CFG edges.

Graph extraction

  • Go to src/data_preparation/scripts
  • Install dependencies with pip install -r requirements.txt
  • Run python -m graph_generator.run -i {input_dir} -o {output_dir}
  • You can select output format with -f {format}. Currently, dot and jsonl_gz are supported
  • To explore graphs you can use prettyprint_graph in src/data_preparation/scripts/graph_generator/graphgenutils.py

A deep learning algorithm for predicting types in Python. Please find a preprint here.

This repository contains its implementation (src/) and experiments (exp/).

Please cite as:

@inproceedings{allamanis2020typilus,
  title={Typilus: Neural Type Hints},
  author={Allamanis, Miltiadis and Barr, Earl T and Ducousso, Soline and Gao, Zheng},
  booktitle={PLDI},
  year={2020}
}

typilus's People

Contributors

egor-bogomolov avatar mallamanis avatar dependabot[bot] avatar ucabgao 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.