{"id":13726598,"url":"https://github.com/eignnx/thoreaulog","last_synced_at":"2026-01-02T03:03:37.370Z","repository":{"id":44143489,"uuid":"185712181","full_name":"eignnx/thoreaulog","owner":"eignnx","description":"A simple Prolog implementation written in ReasonML.","archived":false,"fork":false,"pushed_at":"2023-01-03T21:43:30.000Z","size":585,"stargazers_count":5,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T17:35:39.762Z","etag":null,"topics":["javascript-library","prolog","prolog-implementation","reasonml"],"latest_commit_sha":null,"homepage":"","language":"Reason","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/eignnx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-09T02:30:59.000Z","updated_at":"2021-04-19T06:39:23.000Z","dependencies_parsed_at":"2023-02-01T10:31:47.403Z","dependency_job_id":null,"html_url":"https://github.com/eignnx/thoreaulog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eignnx%2Fthoreaulog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eignnx%2Fthoreaulog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eignnx%2Fthoreaulog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eignnx%2Fthoreaulog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eignnx","download_url":"https://codeload.github.com/eignnx/thoreaulog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243672369,"owners_count":20328762,"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":["javascript-library","prolog","prolog-implementation","reasonml"],"created_at":"2024-08-03T01:03:14.178Z","updated_at":"2026-01-02T03:03:37.292Z","avatar_url":"https://github.com/eignnx.png","language":"Reason","funding_links":[],"categories":["Reason"],"sub_categories":[],"readme":"# Thoreaulog\nA simple Prolog implementation written in ReasonML. Use it in your web applications!\n\n## Example\n\n```javascript\nconst {\n    KnowledgeBase,\n    Query,\n    Term,\n} = require(\"thoreaulog\");\n\nconst kb = new KnowledgeBase();\nkb.addFact(\"likes\", [\"darcy\", \"carrie\"]);\nkb.addFact(\"likes\", [\"carrie\", \"darcy\"]);\n\nconst likes = (a, b) =\u003e Query.Term(Term.Pred(\"likes\", [a, b]));\nconst [X, Y] = [Term.Var(\"X\"), Term.Var(\"Y\")];\n\nconst q = Query.And([\n    likes(X, Y), likes(Y, X)\n]);\n\nconst ans = [\n    {\n        \"X\": Term.Atom(\"carrie\"),\n        \"Y\": Term.Atom(\"darcy\"),\n    },\n    {\n        \"X\": Term.Atom(\"darcy\"),\n        \"Y\": Term.Atom(\"carrie\"),\n    },\n];\n\n// Extract answers incrementally...\nkb.query(q);\nconst actual = [kb.answer(), kb.answer()];\nexpect(actual).toEqual(ans);\n\n// ...or all at once.\nkb.query(q);\nexpect(kb.allAnswers()).toEqual(ans);\n```\n\n## Build\n```\nnpm run build\n```\n\n## Run Tests\nRequires `jest` is installed on your system (`$ which jest` should return something).\n```\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feignnx%2Fthoreaulog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feignnx%2Fthoreaulog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feignnx%2Fthoreaulog/lists"}