Giter Site home page Giter Site logo

davidbakereffendi / graplhook4j Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 229 KB

A Java driver for the GraPL project to provide an interface for connecting and writing to various graph databases based on the code-property graph schema.

License: Apache License 2.0

Java 6.56% Groovy 2.96% Kotlin 90.48%

graplhook4j's Introduction

Hi there ๐Ÿ‘‹

I'm a PhD student @ Stellenbosch University and Directory of R&D @ Whirly Labs

  • ๐Ÿ”ญ Iโ€™m currently working on Joern and related static analysis research
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on code feature mining, partial program analysis, and accelerating program analysis with CPGs
  • ๐Ÿ“ซ How to reach me: [email protected]
  • ๐Ÿ˜„ Pronouns: he/him

Dave's GitHub stats

graplhook4j's People

Contributors

davidbakereffendi avatar

Watchers

 avatar  avatar

graplhook4j's Issues

Update CPG Schema

Some of the latest changes on ShiftLeft's repository

  • JumpTarget introduced
  • A few properties added to vertices such as MetaData

Create API for Control Structure Vertices

Currently, control structures are built with generic block vertices which are not correct. This means that the driver needs to create a control structure vertex creation and linking.

Ability to obtain the largest AST order from a graph

Due to the nature of j2GraPL's new controller structure, the order is persisted across multiple files in order to keep the order unique. When a graph is saved and then deserialized later to add to, the current order needs to be set in the controller.

The hook should provide a method to obtain the latest order of the graph.

Re-order AST nodes when subgraph removed

If a file or method changes and the old file or method is removed, the order property will no longer make sense. If [x, y] nodes are removed, z needs to take on the value of x and so on. After this order is resolved, the removed file or method can once again be added.

Create schema for TigerGraph

Before we can implement a hook for TigerGraph, we need to create a schema. This can be implemented once AST jump statements are handled.

Use Remote Gremlin connection instead of JanusGraph Client

The JanusGraph client is currently what is used to connect to a JanusGraph instance which allows for the full JanusGraph API but this has more cons than pros for GraPL. The suggested fix is to migrate the current JanusGraph hook to use the remote connection API which is more graph database neutral but means that testing and implementation needs to be refactored.

This does, unfortunately, mean that we lose the ability to serialize and deserialize the graph database outside of the backend server.

NamespaceBlock resolution issues

NamespaceBlock resolution with FileVertex has come up in tests with j2GraPL. This has also exposed an ID duplication when serializing the graph to GraphML.

Migrate to Gradle

Following the changes in j2GraPL, this repository should also move to Gradle.

Test compatibility with other versions of Java

GraPLHook4j's minimum version is Java 8 and the CI/CD only tests on this. To be thorough it would be useful to have Travis test up until at least JDK11 which, at the time of writing, is the latest LTS version of Java still supported.

Be able to check if there is a block with a given order

When using assignToBlock there is no way to know if there is a block with that order in the graph database so we may have to use try-catch blocks which is a bit inefficient. There should be a method to check if there is a block with an associated order.

Add formal CONTRIBUTING to GraPLHook4j

Until now, an informal way of contributing and prefixing commit messages has been used. In order to keep the commit history clean a more formal CONTRIBUTING file should be added.

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.