plume

Plume is a code representation benchmarking library with options to extract the AST from Java bytecode and store the result in various graph databases.

https://github.com/plume-oss/plume

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary

Keywords

amazon-neptune code-property-graph graph-databases janusgraph neo4j overflowdb tigergraph tinkergraph
Last synced: 6 months ago · JSON representation

Repository

Plume is a code representation benchmarking library with options to extract the AST from Java bytecode and store the result in various graph databases.

Basic Info
Statistics
  • Stars: 73
  • Watchers: 2
  • Forks: 9
  • Open Issues: 0
  • Releases: 104
Topics
amazon-neptune code-property-graph graph-databases janusgraph neo4j overflowdb tigergraph tinkergraph
Created over 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Citation

README.md

Plume Banner

Plume is a language front-end to construct ASTs based on the code-property graphs schema from JVM bytecode. Plume is graph database agnostic and can store the graphs to multiple graph databases.

License GitHub Actions

Important

Plume is the original implementation of jimple2cpg. The frontend on Joern project is optimized around OverflowDB and is much more lightweight. This is project focuses on experimenting with incremental dataflow analysis and comparing database backend performance.

Versions < 0.6.3 of Plume were Kotlin based but versions from 1.0.0 onwards have been moved to a Scala implementation for better interfacing with the CPG schema library.

If your project depends on Plume I am happy to still provide maintenance and support, but I recommend any new research to begin on Joern where I also spend time providing help and support.

[!TIP] A flatgraph-based fork in on dave/flatgraph. This is not merged into the default branch as the current flatgraph.DiffGraphBuilder API is more encapsulated than OverflowDB's.

Quickstart

One can run Plume from the plume binary which will use OverflowDB as the graph database backend if no config is found. If one would like to configure another backend then use the CLI arguments:

```bash Usage: plume [tinkergraph|overflowdb|neo4j|neo4j-embedded|tigergraph|neptune] [options] input-dir

An AST creator for comparing graph databases as static analysis backends. -h, --help input-dir The target application to parse. Command: tinkergraph [options]

--import-path The TinkerGraph to import. --export-path The TinkerGraph export path to serialize the result to. Command: overflowdb [options]

--storage-location --heap-percentage-threshold --enable-serialization-stats Command: neo4j [options]

--hostname --port --username --password --tx-max Command: neo4j-embedded [options]

--databaseName --databaseDir --tx-max Command: tigergraph [options]

--hostname --restpp-port --gsql-port --username --password --timeout --tx-max --scheme Command: neptune [options]

--hostname --port --key-cert-chain-file --tx-max ```

For more documentation and basic guides, check out the project homepage or the ScalaDoc.

Important: If you are using the TigerGraph driver you need to install the gsql_client.jarand add it to an environment variable called GSQL_CLIENT. Instructions are here e.g.,

bash curl https://docs.tigergraph.com/tigergraph-server/current/gsql-shell/_attachments/gsql_client.jar --output gsql_client.jar export GSQL_HOME=`pwd`/gsql_client.jar

Remember to set the tgVersion correctly in the TigerGraphDriver.

[!WARNING]
At the time of writing, TigerGraph now ships Docker containers with licenses of restricted lifespans, thus killing access to older versions. Due to this, and some other moves to becoming more proprietary, I have been unable to support newer versions of Tigergraph.

Community

Benchmarks

Plume specifies a benchmark binary which orchestrates running JMH benchmarks for AST creation with various graph database backends. While the binary explains the available functions, the execution should be run within sbt, e.g.

sbt Jmh/runMain com.github.plume.oss.Benchmark overflowdb testprogram -o output -r results --storage-location test.cpg

An automated script to run the benchmarks versus programs from the defects4j dataset is available under runBenchmarks.sc, which can be executed with: bash scala runBenchmarks.sc

Known Bugs

  • Due to module encapsulation in Java 17, Kryo serialization for TinkerGraphDriver will not work due to serialization errors. There are ways around this with some additional config, however.
  • When running benchmarks, the classpath is sometimes in an abnormal state, and the mutated JMH classes are missing. this usually resolves itself after re-running the process.

Logging

Plume uses SLF4J as the logging fascade.

Sponsored by

Amazon Science

Owner

  • Name: Plume CPG Analysis Library
  • Login: plume-oss
  • Kind: organization
  • Email: dbe@sun.ac.za

A Soot-based, open-source code-property graph (CPG) analysis library to project and incrementally analyze the CPG of programs in graph databases.

GitHub Events

Total
  • Watch event: 6
Last Year
  • Watch event: 6

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • actions/setup-java v1 composite
  • codecov/codecov-action v1 composite
.github/workflows/docs.yml actions
  • actions/checkout v2 composite
  • actions/setup-java v1 composite
  • webfactory/ssh-agent v0.5.4 composite
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • actions/create-release v1 composite
  • actions/setup-java v1 composite
drivers/tigergraph/src/test/resources/docker/Dockerfile docker
  • tigergraph/tigergraph 3.9.3-1 build