{"id":24070320,"url":"https://github.com/yuanchengjiang/graphgenie","last_synced_at":"2025-07-08T12:34:41.504Z","repository":{"id":203217568,"uuid":"691515926","full_name":"YuanchengJiang/GraphGenie","owner":"YuanchengJiang","description":"To detect logic bugs in graph database engines by mutating graph query patterns. ICSE'24.","archived":false,"fork":false,"pushed_at":"2024-01-24T08:51:16.000Z","size":319,"stargazers_count":33,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-27T12:57:53.016Z","etag":null,"topics":["database-testing","graph-database"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YuanchengJiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-14T10:38:51.000Z","updated_at":"2025-02-23T08:14:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"10f93850-5508-430b-99d6-86c954a560c5","html_url":"https://github.com/YuanchengJiang/GraphGenie","commit_stats":null,"previous_names":["yuanchengjiang/graphgenie"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuanchengJiang%2FGraphGenie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuanchengJiang%2FGraphGenie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuanchengJiang%2FGraphGenie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuanchengJiang%2FGraphGenie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YuanchengJiang","download_url":"https://codeload.github.com/YuanchengJiang/GraphGenie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251141829,"owners_count":21542430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["database-testing","graph-database"],"created_at":"2025-01-09T15:37:46.339Z","updated_at":"2025-04-27T12:58:11.893Z","avatar_url":"https://github.com/YuanchengJiang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=fig/new_logo.png width=100% /\u003e\n\n## Introduction\n\nGraphGenie is an bug-finding tool to detect logic bugs and performance issues (we also find internal errors) in graph database management systems. Specifically, unlike most existing testing works mutating query predicates, GraphGenie leverages Graph Query Transformations (GQT) to construct semantically equivalent or variant graph query patterns, which enables comparative analysis on their results to reveal bugs. GraphGenie has been tested and found previous unknown bugs on popular graph database engines like Neo4j.\n\nIf you use, extend or build upon GraphGenie we kindly ask you to cite the our ICSE'24 paper:\n```\n@inproceedings{jiang2024detecting,\n  title={Detecting Logic Bugs in Graph Database Management Systems via Injective and Surjective Graph Query Transformation},\n  author={Jiang, Yuancheng and Liu, Jiahao and Ba, Jinsheng and Yap, Roland H.C. and Liang, Zhenkai and Rigger, Manuel},\n  booktitle={Proceedings of the 46th International Conference on Software Engineering},\n  publisher = {{ACM}},\n  year={2024},\n  doi = {10.1145/3597503.3623307}\n}\n```\n\n## Environment Requirement\nThe code has been tested running under Python 3.8.10. The OS is 20.04.2 LTS Ubuntu Linux 64-bit distribution.\n\n**Dependencies**\n```\napt install python3\napt install python3-pip\npip3 install configparser\npip3 install neo4j\npip3 install redisgraph\npip3 install psycopg2\n```\n\n## Graph Database Engine Setup\n\nWe do not initialize graph data. We use existing graph dataset like [recommendations](https://github.com/neo4j-graph-examples/recommendations.git). We give concrete steps for setting up the [Neo4j](https://github.com/neo4j/neo4j) below. For other graph database engines, please refer to official documentations for installation and dataset initialization. We include the python drivers for [RedisGraph](https://github.com/RedisGraph/RedisGraph/) and [AgensGraph](https://github.com/bitnine-oss/agensgraph/) in our code.\n\n**Neo4j**\n\n```\napt install openjdk-17-jdk;\ncd dbs;\nwget https://dist.neo4j.org/neo4j-community-5.11.0-unix.tar.gz;\ntar -xvf neo4j-community-5.11.0-unix.tar.gz;\ngit clone https://github.com/neo4j-graph-examples/recommendations.git;\ncd neo4j-community-5.11.0;\n./bin/neo4j-admin dbms set-initial-password 12344321\n./bin/neo4j-admin database load --from-stdin --overwrite-destination=true neo4j \u003c ../recommendations/data/recommendations-50.dump;\necho \"dbms.transaction.timeout=30s\" \u003e\u003e ./conf/neo4j.conf\n./bin/neo4j start\n```\n\n## Usage\n\nConfig graphgenie.ini first and then start the testing:\n\nIf you test Neo4j, simply run the main.py\n```\n./main.py\n```\nFor other databases, you need to first initialize the dataset and specify\n```\nnode_labels, edge_labels, node_properties, connectivity_matrix\n```\nin main.py line 332, or implement your own schema scanner (should be similar to Neo4j one).\n\nDetected bugs can be found in `./bug.log` (logic bugs or performance issues) or `./exception.log` (internal errors). The `./testing.log` records all executed queries.\n\n## Todos\n\nWe only implement the prototype code. There are still many todos:\n\n* to support GDBMS: Memgraph/Kuzu/FalkorDB/..\n* to have an option for automatically initializing the graph data so we do not need existing dataset\n* to support testing update/insert clauses\n* to have more mutation rules\n* to limit the max threads\n\n## About Gremlin\n\nWe focus on testing Cypher query language. Currently we do not release the code for testing Gremlin database engines because we are using the [cypher-for-gremlin](https://github.com/opencypher/cypher-for-gremlin) translator, which sometimes leads to inaccurate translation and false bug alarm.\n\n## Bugs we found:\n\n[Neo4j](https://github.com/neo4j/neo4j/issues/created_by/YuanchengJiang), [RedisGraph](https://github.com/RedisGraph/RedisGraph/issues/created_by/YuanchengJiang), [AgensGraph](https://github.com/bitnine-oss/agensgraph/issues/created_by/YuanchengJiang)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuanchengjiang%2Fgraphgenie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuanchengjiang%2Fgraphgenie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuanchengjiang%2Fgraphgenie/lists"}