{"id":43528504,"url":"https://github.com/guodong/nanobdd","last_synced_at":"2026-02-03T15:35:12.649Z","repository":{"id":162150621,"uuid":"636747986","full_name":"guodong/nanobdd","owner":"guodong","description":"First-ever high-performance thread-safe BDD library","archived":false,"fork":false,"pushed_at":"2025-12-30T07:08:13.000Z","size":108,"stargazers_count":8,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T18:41:02.126Z","etag":null,"topics":["bdd","bdd-framework","concurrency","formal-methods","parallel","threadsafe","verification"],"latest_commit_sha":null,"homepage":"https://github.com/guodong/nanobdd/wiki","language":"C++","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/guodong.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-05T14:49:50.000Z","updated_at":"2025-12-30T07:08:18.000Z","dependencies_parsed_at":"2023-05-26T00:00:15.183Z","dependency_job_id":"2ccb09f4-925a-4bb3-9be6-72b672629a2a","html_url":"https://github.com/guodong/nanobdd","commit_stats":{"total_commits":50,"total_committers":1,"mean_commits":50.0,"dds":0.0,"last_synced_commit":"45129d5c397b31f5a717fed75de868c659043f26"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/guodong/nanobdd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guodong%2Fnanobdd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guodong%2Fnanobdd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guodong%2Fnanobdd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guodong%2Fnanobdd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guodong","download_url":"https://codeload.github.com/guodong/nanobdd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guodong%2Fnanobdd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29047952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:19:55.533Z","status":"ssl_error","status_checked_at":"2026-02-03T15:13:09.723Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["bdd","bdd-framework","concurrency","formal-methods","parallel","threadsafe","verification"],"created_at":"2026-02-03T15:35:10.265Z","updated_at":"2026-02-03T15:35:12.637Z","avatar_url":"https://github.com/guodong.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nanobdd\nFirst-ever high-performance thread-safe BDD (Binary Decision Diagrams) library.\n\nAs of our research, Nanobdd is currently the fastest BDD library available, achieving exceptional performance in various benchmarks and use cases.\n\nThis project is the public implementation of our SIGCOMM'23 poster:\n\n* Guo D, Luo J, Gao K, et al. Poster: Scaling Data Plane Verification with Throughput-Optimized Atomic Predicates. In Proceedings of the SIGCOMM '23 Poster and Demo Sessions (SIGCOMM '23), New York, NY, USA, Sep. 10 2023.\n\n# Features\n- Fully **lock-free** concurrency\n- **Automatic referencing** for BDD nodes\n- User controlled **garbage collection**\n- Easy-to-use APIs by C++ **operator overloading**\n- **Java JNI bindings** for Java developers\n- And of course, it is **thread-safe**!\n\n# Install\n## Dependencies\nNanobdd depends on tbb for concurrent data structures. \n\nCMake (\u003e=v3.2) and g++(\u003e=v9) are required for compilation.\n\nFor Java JNI bindings, make sure that you have JDK 17 pre-installed and set the \nJAVA_HOME environment variable correctly.\n\n## Compile and install\nNanobdd follows the standard CMake project structure, the quick installation steps are as follows:\n```\ngit clone https://github.com/guodong/nanobdd\ncd nanobdd\nmkdir build\ncd build\ncmake ..\nmake\nsudo make install\n```\n\nFor Java bindings, use maven to compile and install:\n```\ncd java\nmvn install\n# should see repository/org/snlab/jni/NanoBDD/1/NanoBDD-1.jar in your $M2_HOME\n```\n\n# Basic usage\nA simple c++ code to use nanobdd is as follows:\n```c++\n// include the nanobdd header file\n#include \u003cnanobdd/nanobdd.h\u003e\n#include \u003cassert.h\u003e\n\nint main(int argc, char** argv) {\n  // init nanobdd with node table size, cache size, and the number of variables\n  nanobdd::init(1000, 1000, 3);\n\n  // get the three variables\n  auto x = nanobdd::getVar(0);\n  auto y = nanobdd::getVar(1);\n  auto z = nanobdd::getVar(2);\n\n  // do magic using c++ operators\n  auto xy = x \u0026 y;\n  auto xyz = xy \u0026 z;\n  auto xyZ = xy \u0026 !z;\n\n  assert(xy == (xyz | xyZ));\n  assert(xy != nanobdd::bddFalse());\n\n  return 0;\n}\n```\n\nCompile and execute the above code by:\n```\ng++ -o exe test.cpp -lnanobdd -ltbb\n./exe\n```\nIf no exceptions, that means the assertions are passed.\n\n# Thread-safe concurrency\nThe most powerful feature of nanobdd is that it is thread-safe, which is achieved lock-free algorithms. One can safely perform any bdd operations in different threads, nanobdd will handle all underlay data contensions.\nAn example for using C++17 parallel STL:\n```c++\nstd::for_each(\n  std::execution::par,\n  somebdds.begin(),\n  somebdds.end(),\n  [\u0026](auto bdd) {\n    // operate your bdd here\n  });\n```\nSee `examples/paralle.cpp` for full example.\n\n# Performance\nWe have compared nanobdd with other librarys including Buddy, JDD and Sylvan in a network verification project on a 40 CPU cores server. Typically, nanobdd is 2~10x faster than others.\n\n# Author and contact\nAuthor: Dong Guo (PhD candidate of Tongji University)\n\nEmail: gd@tongji.edu.cn\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguodong%2Fnanobdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguodong%2Fnanobdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguodong%2Fnanobdd/lists"}