{"id":23090006,"url":"https://github.com/facticiusvir/backtraq","last_synced_at":"2025-10-27T13:45:19.648Z","repository":{"id":150412458,"uuid":"72877112","full_name":"FacticiusVir/BacktraQ","owner":"FacticiusVir","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-17T07:33:11.000Z","size":82,"stargazers_count":13,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-16T08:41:10.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/FacticiusVir.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":"2016-11-04T19:01:51.000Z","updated_at":"2025-04-21T19:08:30.000Z","dependencies_parsed_at":"2023-04-10T05:31:04.063Z","dependency_job_id":null,"html_url":"https://github.com/FacticiusVir/BacktraQ","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FacticiusVir/BacktraQ","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FacticiusVir%2FBacktraQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FacticiusVir%2FBacktraQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FacticiusVir%2FBacktraQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FacticiusVir%2FBacktraQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FacticiusVir","download_url":"https://codeload.github.com/FacticiusVir/BacktraQ/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FacticiusVir%2FBacktraQ/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281279068,"owners_count":26473855,"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","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-12-16T20:51:57.186Z","updated_at":"2025-10-27T13:45:19.643Z","avatar_url":"https://github.com/FacticiusVir.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BacktraQ\n\nBacktraQ is a framework for running Prolog-like queries with backtracking, choicepoints \u0026 variable unification within managed C#.\n\nThe library has no external dependencies and runs as pure managed code, to allow it to be used in limited/sandbox domains like Unity3D.\n\n## Usage\n\nBacktraQ has two stages - building queries, and running them. Building queries is designed to look like a native extension to C# syntax, so logic program code is inline with regular imperative statements. Various operators have been overloaded to support this - for example, `\u003c=` is used as the unification operator.\n\n```c#\n\n// Create unbound variables\nvar a = new Var\u003cint\u003e();\nvar b = new Var\u003cint\u003e();\n\n// Create query as \"unify a with b, and unify b with 123\"\nvar query = a \u003c= b \u0026 b \u003c= 123;\n\n```\n\nThe query doesn't execute and no variables are set/unified until you test for success:\n\n```c#\n\nif (query.Succeeds())\n{\n    Console.WriteLine($\"a = {a}\");\n    Console.WriteLine($\"b = {b}\");\n}\n\n```\n\nIf a query may have multiple solutions, it can be iterated over and the value of each variable will update:\n\n\n```c#\n\n// Create unbound variable\nvar a = new Var\u003cint\u003e();\n\n// Create query as \"unify a with 'a', or 'b', or 'c'\"\nvar query = a \u003c= 'a' | a \u003c= 'b' | a \u003c= 'c';\n\nforeach (var result in query)\n{\n    Console.WriteLine($\"a = {a}\");\n}\n\n```\n\n## Contributing\nPull requests are welcome!\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacticiusvir%2Fbacktraq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffacticiusvir%2Fbacktraq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacticiusvir%2Fbacktraq/lists"}