{"id":38600814,"url":"https://github.com/roanh/cpq-native-index","last_synced_at":"2026-01-17T08:33:28.895Z","repository":{"id":180695757,"uuid":"665532576","full_name":"RoanH/CPQ-native-index","owner":"RoanH","description":"A graph database index with native support for CPQs.","archived":false,"fork":false,"pushed_at":"2025-12-16T22:18:00.000Z","size":1573,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-12T19:57:12.170Z","etag":null,"topics":["cpq","database","database-index","graph","graph-database","index"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RoanH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"RoanH","ko_fi":"RoanHofland","custom":"https://www.paypal.me/RoanHofland"}},"created_at":"2023-07-12T12:15:08.000Z","updated_at":"2025-12-16T22:18:04.000Z","dependencies_parsed_at":"2023-11-15T06:44:12.566Z","dependency_job_id":null,"html_url":"https://github.com/RoanH/CPQ-native-index","commit_stats":{"total_commits":213,"total_committers":2,"mean_commits":106.5,"dds":0.3615023474178404,"last_synced_commit":"3ed90b90dacaf3fb6000a1fd74e4b8bb08bed30a"},"previous_names":["roanh/cpq-native-index"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/RoanH/CPQ-native-index","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoanH%2FCPQ-native-index","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoanH%2FCPQ-native-index/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoanH%2FCPQ-native-index/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoanH%2FCPQ-native-index/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RoanH","download_url":"https://codeload.github.com/RoanH/CPQ-native-index/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoanH%2FCPQ-native-index/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpq","database","database-index","graph","graph-database","index"],"created_at":"2026-01-17T08:33:28.831Z","updated_at":"2026-01-17T08:33:28.886Z","avatar_url":"https://github.com/RoanH.png","language":"Java","funding_links":["https://github.com/sponsors/RoanH","https://ko-fi.com/RoanHofland","https://www.paypal.me/RoanHofland"],"categories":[],"sub_categories":[],"readme":"# CPQ-native Index [![](https://img.shields.io/github/release/RoanH/CPQ-native-index.svg)](https://github.com/RoanH/CPQ-native-index/releases)\nThis repository contains the implementation of a CPQ-native Index, which is a language-aware graph database index for Conjunctive Path Queries (CPQ). This is the reference implementation for my Master's Thesis titled [Indexing Conjunctive Path Queries for Accelerated Query Evaluation](https://research.roanh.dev/Indexing%20Conjunctive%20Path%20Queries%20for%20Accelerated%20Query%20Evaluation.pdf). The work presented here is follow-up research to the [CPQ-aware graph database index](https://ieeexplore.ieee.org/document/9835359) proposed by Yuya Sasaki, George Fletcher and Makoto Onizuka. Documentation (javadoc) can be found at: [cpqnativeindex.docs.roanh.dev](https://cpqnativeindex.docs.roanh.dev/) and the most important information is available in my thesis.\n\n## Getting Started\nTo support a wide variety of of use cases the CPQ-native Index is a available in a number of different formats. \n\n- [As a standalone executable with both a command line interface](#executable-download)\n- [As a docker image](#docker-image-)\n- [As a maven artifact](#maven-artifact-)\n\nHowever, it should be noted that some of these options provide less control over the execution environment than others. The recommended way to use the index software is to either incorporate it directly in some other piece of software, or to use the Java archive release if no customisation is required. Allocating as much RAM to the heap of the process as possible is recommended when computing an index for large graphs.\n\n### Command-line Usage\nWhen using the command line interface of the index, the following arguments are supported:\n\n```\nusage: index [-c] -d \u003cfile\u003e [-f] [-h] [-i \u003cmax\u003e] -k \u003ck\u003e [-l] -o \u003cfile\u003e [-t \u003cnumber\u003e] [-v \u003cfile\u003e]\n -c,--cores                 If passed then cores will be computed.\n -d,--data \u003cfile\u003e           The graph file to create an index for or a saved index file.\n -f,--full                  If passed the saved index has all information required to compute cores later.\n -h,--help                  Prints this help text\n -i,--intersections \u003cmax\u003e   The maximum number of branches for intersection cores (unlimited by default).\n -k,--diameter \u003ck\u003e          The value of k (diameter) to compute the index for.\n -l,--labels                If passed then labels will be computed.\n -o,--output \u003cfile\u003e         The file to save the constructed index to.\n -t,--threads \u003cnumber\u003e      The number of threads to use for core computation (1 by default).\n -v,--verbose \u003cfile\u003e        Turns on verbose logging of construction steps, optionally to a file or Discord.\n```\n\nFor example, a base index without cores can be constructed using:\n\n```sh\njava -Xmx1900G -jar Index.jar -f -d graph.edge -k 2 -t 64 -v log.txt -o base_index.idx\n```\n\nThe `-Xmx` argument is passed to Java and controls the maximum amount of RAM that will be used for the heap. Later a version of the base index with cores can be constructed using:\n\n```sh\njava -Xmx1900G -jar Index.jar -d base_index.idx -k 2 -c -t 64 -v discord:log.txt -o index.idx\n```\n\nNote that `discord:` can be prepended to the log file argument, which will send computation progress updates to the webhook configured in the `DISCORD\\_WEBHOOK` variable in the `Main` class of the program. By default no webhook is configured, so configuring this requires compiling from source. For testing, the robots dataset is available in the [CPQ-aware Index repository](https://github.com/yuya-s/CPQ-aware-index/blob/main/data/robots.edge).\n\n### Executable Download\nThe CPQ-native Index is available as a standalone portable executable with a command line interface. This version of the index requires Java 17 or higher to run. Note that the Windows executable release does not offer the same degree of control over the heap size as the Java archive version.\n\n- [Windows executable download](https://github.com/RoanH/CPQ-native-index/releases/download/v1.0/Index-v1.0.exe)    \n- [Runnable Java archive (JAR) download](https://github.com/RoanH/CPQ-native-index/releases/download/v1.0/Index-v1.0.jar)\n\nAll releases: [releases](https://github.com/RoanH/CPQ-native-index/releases)    \nGitHub repository: [RoanH/CPQ-native-index](https://github.com/RoanH/CPQ-native-index)\n\n### Docker Image [![](https://img.shields.io/docker/v/roanh/cpq-native-index?sort=semver)](https://hub.docker.com/r/roanh/cpq-native-index)\nThe CPQ-native Index is available as a [docker image](https://hub.docker.com/r/roanh/cpq-native-index) on Docker Hub. This means that you can obtain the image using the following command:\n\n```sh\ndocker pull roanh/cpq-native-index:latest\n```\n\nUsing the image then works much the same as regular command line usage. For example, we can generate the example base index using the following command:\n\n```sh\ndocker run --rm -v \"$PWD/data:/data\" roanh/cpq-native-index:latest java -Xmx1900G -jar Index.jar -f -d /data/graph.edge -k 2 -t 64 -v /data/log.txt -o /data/base_index.idx\n```\n\nNote that we mount a local folder called `data` into the container to pass our graph and to retrieve the generated index and logs. Also note that the entry point of the image has to be overridden to explicitly allocate more RAM to the heap.\n\n### Maven Artifact [![Maven Central](https://img.shields.io/maven-central/v/dev.roanh.cpqnativeindex/cpq-native-index)](https://mvnrepository.com/artifact/dev.roanh.cpqnativeindex/cpq-native-index)\nThe CPQ-native Index is available on maven central as [an artifact](https://mvnrepository.com/artifact/dev.roanh.cpqnativeindex/cpq-native-index), this way it can be included directly in another Java project using build tools like Gradle and Maven. Using this method it also becomes possible to directly use all the implemented constructs and utilities. A hosted version of the javadoc for for the index can be found at [cpqnativeindex.docs.roanh.dev](https://cpqnativeindex.docs.roanh.dev/).\n\n##### Gradle \n```groovy\nrepositories{\n\tmavenCentral()\n}\n\ndependencies{\n\timplementation 'dev.roanh.cpqnativeindex:cpq-native-index:1.0'\n}\n```\n\n##### Maven\n```xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003edev.roanh.cpqnativeindex\u003c/groupId\u003e\n\t\u003cartifactId\u003ecpq-native-index\u003c/artifactId\u003e\n\t\u003cversion\u003e1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Development of the Index\nThis repository contain an [Eclipse](https://www.eclipse.org/) \u0026 [Gradle](https://gradle.org/) project with [gMark](https://github.com/RoanH/gMark) and [Apache Commons CLI](https://commons.apache.org/proper/commons-cli/introduction.html) as the only dependencies. In addition, in order to compile the native library a C compiler and CMake are also required. Development work can be done using the Eclipse IDE or using any other Gradle compatible IDE. Unit testing is employed to test core functionality. Continuous integration is used to run checks on the source files, check for regressions using the unit tests, and to generate release publications.\n\nCompiling the native library can be done using the following command in the `CPQ-native Index` directory:\n\n```sh\n./gradlew compileNatives\n```\n\nRunning this command will place the compiled native library in the `lib` directory. Next, compiling the runnable Java archive (JAR) release of the index using Gradle can be done by running the following command in the same directory:\n\n```sh\n./gradlew shadowJar\n```\n\nAfter running this command the generated JAR can be found in the `build/libs` directory. On windows `./gradlew.bat` should be used for both commands instead of `./gradlew`. Also note that the native libraries should always be compiled before building a complete release JAR.\n\nIn software, an index can be constructed using the following constructor:\n\n```java\nIndex index = new Index(\n\tIndexUtil.readGraph(graphFile),\n\tk,\n\tcores,\n\tlabels,\n\tthreads,\n\tintersections,\n\tlistener\n);\n```\n\n## History\nProject development started: 27th of February, 2023.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froanh%2Fcpq-native-index","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froanh%2Fcpq-native-index","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froanh%2Fcpq-native-index/lists"}