{"id":13749269,"url":"https://github.com/chalcolith/rslogic","last_synced_at":"2025-07-13T18:39:01.156Z","repository":{"id":57663702,"uuid":"50759927","full_name":"chalcolith/rslogic","owner":"chalcolith","description":"A logic programming library (inspired by uKanren) in Rust.","archived":false,"fork":false,"pushed_at":"2016-02-06T06:37:29.000Z","size":10,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-22T22:31:42.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chalcolith.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}},"created_at":"2016-01-31T05:12:58.000Z","updated_at":"2022-12-02T08:24:13.000Z","dependencies_parsed_at":"2022-08-28T00:11:38.415Z","dependency_job_id":null,"html_url":"https://github.com/chalcolith/rslogic","commit_stats":null,"previous_names":["kulibali/rslogic"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chalcolith%2Frslogic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chalcolith%2Frslogic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chalcolith%2Frslogic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chalcolith%2Frslogic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chalcolith","download_url":"https://codeload.github.com/chalcolith/rslogic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610338,"owners_count":21132919,"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":[],"created_at":"2024-08-03T07:00:58.204Z","updated_at":"2025-04-12T18:10:36.210Z","avatar_url":"https://github.com/chalcolith.png","language":"Rust","funding_links":[],"categories":["Kanren"],"sub_categories":["Libraries"],"readme":"# rslogic ![Build Status](https://travis-ci.org/kulibali/rslogic.svg?branch=master)\n\n**[rslogic](https://github.com/kulibali/rslogic)** is a logic programming framework\nfor Rust inspired by [µKanren](https://github.com/jasonhemann/microKanren).\n\n[API Documentation](https://kulibali.github.io/rslogic)\n\nA logical statement is built from **variables**, **states**, and **goals**.\nCreate an initial state, then obtain some variables (and resulting state) from it.\nConstruct a goal consisting of variable bindings, logical operations (AND, OR), or\npredicates.  Then evaluate the goal using the state resulting from making the variables.\nEvaluating a goal returns all possible solutions to the statement, in the form of\na number of states containing variable bindings.\n\n```\nuse rslogic::state;\nuse rslogic::state::{Unif, State, PossibleStates};\nuse rslogic::goal;\nuse rslogic::goal::{Goal, fail, unify_val, unify_vars, conj, disj, pred};\n\nlet s = state::State::\u003ci32\u003e::empty();\nlet (v1, s) = s.make_var();\nlet (v2, s) = s.make_var();\n\nlet n = 123;\nlet g = goal::conj(goal::unify_vars(\u0026v1, \u0026v2), goal::unify_val(\u0026v2, n));\n\nlet results = g.eval(\u0026s);\nassert_eq!(results.len(), 1);\nlet bound_value = results[0].get(\u0026v1).unwrap();\nassert_eq!(bound_value, \u0026n);\n```\n\nThis example creates two variables, `v1` and `v2`, and then assembles a logical expression\nequivalent to `(v1 = v2) \u0026\u0026 (v2 = 123)`.  When evaluated, the resulting state binds `123` to\nboth `v1` and `v2`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchalcolith%2Frslogic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchalcolith%2Frslogic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchalcolith%2Frslogic/lists"}