{"id":20859384,"url":"https://github.com/engineeringsoftware/ogo","last_synced_at":"2026-03-19T17:51:57.137Z","repository":{"id":234239136,"uuid":"717427643","full_name":"EngineeringSoftware/ogo","owner":"EngineeringSoftware","description":"Object Graph Programming","archived":false,"fork":false,"pushed_at":"2024-04-21T16:13:55.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-19T07:26:18.264Z","etag":null,"topics":["cypher","declarative","heap","imperative","paradigm","programming"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EngineeringSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-11-11T13:11:46.000Z","updated_at":"2024-04-21T16:13:58.000Z","dependencies_parsed_at":"2024-04-21T18:14:24.021Z","dependency_job_id":null,"html_url":"https://github.com/EngineeringSoftware/ogo","commit_stats":null,"previous_names":["engineeringsoftware/ogo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineeringSoftware%2Fogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineeringSoftware%2Fogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineeringSoftware%2Fogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineeringSoftware%2Fogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EngineeringSoftware","download_url":"https://codeload.github.com/EngineeringSoftware/ogo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243230095,"owners_count":20257644,"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":["cypher","declarative","heap","imperative","paradigm","programming"],"created_at":"2024-11-18T04:49:41.349Z","updated_at":"2026-03-14T09:02:22.700Z","avatar_url":"https://github.com/EngineeringSoftware.png","language":null,"readme":"## OGO ##\n\u003cimg src=\"images/ogo_logo.png\" width=\"700\" /\u003e\n\nObject Graph Programming (OGO) enables manipulating the JVM heap\ndeclaratively through queries. The queries are written using the\n[Cypher Query Language](https://neo4j.com/developer/cypher/). OGO\nsupports two high-level modes, $OGO^{Neo}$ and $OGO^{Mem}$. The former\nserializes a sub-graph of the entire JVM heap object graph, loads it\ninto a standalone Neo4J database and executes queries inside it. The\nlatter executes queries in-memory (inside the native agent) using\n[Antlr](https://www.antlr.org/) to parse the query and visitors to\nexecute it Currently, $OGO^{Mem}$ is under construction and not all\nfunctionalities may work.\n\n## Examples ##\n\n1. Searching an `ArrayList` for a given element.\n   ```java\n   ArrayList\u003cLong\u003e lst = new ArrayList\u003cLong\u003e();\n   lst.add(10L);\n   lst.add(20L);\n   lst.add(30L);\n   query(\"MATCH ({$1})-[:elementData]-\u003e()-[]-\u003e({value : 20}) RETURN TRUE\");\n   ```\n   In this example, we use imperative code to instantiate and add elements to\n   an `ArrayList` and then use `Cypher` query through `OGO` to query `lst` to\n   check if it contains element 20.\n\n2. Implementing the `containsKey` method of `java.util.HashMap` class.\n   ```java\n   public boolean containsKeyOgoImpl(HashMap map, object key){\n      queryBool(\"MATCH ({$1})-[:table]-\u003e()-[]-\u003e()-[:key]-\u003e(n)\"\n               +\"MATCH (m {$2})\"\n               +\"WHERE n.`equals`(m)\"\n               +\"RETURN COUNT(n) \u003c\u003e 0\", map, key);\n   }\n   ```\n   In this example, the first `MATCH` clause matches a pattern that collects\n   all the objects corresponding to the `key` field of `HashMap's` inner class\n   `Node` into the variable `n`. The second `MATCH` clause collects the given key\n   object into the variable `m`. The `WHERE` clause filters the elements of `n`\n   based on the output of the `java.lang.Object` class's `equals` method evaluating to\n   true for pairwise inputs from `n` and `m`. This predicate is expected to filter number of\n   elements of `n` to 1 if the given key is present in the `map` and to 0 if absent.\n   Finally, we use the `RETURN` clause to return the value of the expression that\n   compares equality of number of elements of `n` to 0. The query is hence expected to\n   return true iff the number of elements in `n` is non-zero which is true only if the\n   given key is contained in `map`.\n\n\n## Getting Started ##\n\n### Prerequisites\nThe project requires the following dependencies:\n- **Maven** \n- **Java 21** \n- **Conan 2.24.0** \n- **CMake** \n- **Clang Format** \n\n### Installation\n\n#### 1. Install Dependencies\nRun the installation script to automatically install all required dependencies:\n\n```bash\n./tasks.sh install_deps\n```\n\nThis will check for and install any missing dependencies on your system.\n\nAlternatively, verify your dependencies are correctly installed:\n```bash\n./tasks.sh check_deps\n```\n\n#### 2. Build the Project\nCompile the OGO project:\n\n```bash\n./tasks.sh compile\n```\n\n#### 3. Full Installation\nTo compile and install the complete project:\n\n```bash\n./tasks.sh install\n```\n\n### Running the Project\n\n#### Run Tests\nExecute the test suite:\n\n```bash\n./tasks.sh tests\n```\n\n#### Run the Application\nTest out the OGO application by running it against Main.java\n\n```bash\n./tasks.sh exec\n```\n\n#### Format Code\nAuto-format Java and C++ code according to project standards:\n\n```bash\n./tasks.sh format\n```\n\n#### End-to-End Setup\nPerform a complete setup with dependency checks and full installation:\n\n```bash\n./tasks.sh end_to_end\n```\n\n## Using OGO in a Maven Project\n\nAfter packaging, OGO can be used in any maven project.\n\n1. ### Include Client dependency:\n    \n\tThe client jar can be added as a dependency to a third-party project by adding the following to its pom.\n\t```xml\n\t\u003cdependency\u003e\n\t  \u003cgroupId\u003eorg.ogo\u003c/groupId\u003e\n      \u003cartifactId\u003eogo\u003c/artifactId\u003e\n      \u003cversion\u003e0.1.0\u003c/version\u003e\n      \u003cscope\u003esystem\u003c/scope\u003e\n      \u003csystemPath\u003e\u003c!-- ENTER full path to client jar including jar name --\u003e\u003c/systemPath\u003e\n    \u003c/dependency\u003e\n\t```\n\n2. ### Include Native Agent:\n\n    The native agent can be included during execution by adding the following to the third-party pom.\n\t```xml\n    \u003cconfiguration\u003e\n      \u003c!-- for adding native agent ogoAgent --\u003e\n\t  \u003cargLine\u003e-agentpath:\u003c!-- ENTER full path to native agent including native agent name --\u003e\u003c/argLine\u003e\n    \u003c/configuration\u003e\n\t```\n    Some third-party project tend to use other plugins which may overwrite `argLine`. It may be necessary\n\tto explicitly specify this argument while running the tests using maven. This can be done using:\n\t```bash\n\tmvn test -DargLine=\"-agentpath:\u003cENTER full path to native agent including native agent name\u003e\"\n\t```\n    \n## Citation ##\nIf you use OGO in your research, please cite the following paper:\n\n```bibtex\n@inproceedings{ThimmaiahETAL24OGO,\n  author    = {Thimmaiah, Aditya and Lampropoulos, Leonidas and Rossbach, Christopher and Gligoric, Milos},\n  title     = {Object Graph Programming},\n  year      = {2024},\n  doi       = {10.1145/3597503.3623319},\n  booktitle = {International Conference on Software Engineering},\n  pages     = {1--13},\n}\n```\n\nThe paper can be found\n[here](https://users.ece.utexas.edu/~gligoric/papers/ThimmaiahETAL24OGO.pdf).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineeringsoftware%2Fogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengineeringsoftware%2Fogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineeringsoftware%2Fogo/lists"}