{"id":30071046,"url":"https://github.com/comfreek/basic-ontology-language","last_synced_at":"2025-08-08T12:16:36.826Z","repository":{"id":148529612,"uuid":"262334457","full_name":"ComFreek/basic-ontology-language","owner":"ComFreek","description":"An experimental ontology language formalized in Coq with many semantics","archived":false,"fork":false,"pushed_at":"2023-12-15T20:09:25.000Z","size":836,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-12-15T22:10:24.875Z","etag":null,"topics":["coq-formalization","formal-languages","formal-methods","ontologies","semantics"],"latest_commit_sha":null,"homepage":"","language":"Coq","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/ComFreek.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-05-08T13:44:45.000Z","updated_at":"2020-11-14T06:04:45.000Z","dependencies_parsed_at":"2023-12-15T21:37:27.852Z","dependency_job_id":"0be90b0d-9120-4e5f-896f-63bc57b2948b","html_url":"https://github.com/ComFreek/basic-ontology-language","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/ComFreek/basic-ontology-language","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComFreek%2Fbasic-ontology-language","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComFreek%2Fbasic-ontology-language/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComFreek%2Fbasic-ontology-language/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComFreek%2Fbasic-ontology-language/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ComFreek","download_url":"https://codeload.github.com/ComFreek/basic-ontology-language/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComFreek%2Fbasic-ontology-language/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269418087,"owners_count":24413521,"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-08-08T02:00:09.200Z","response_time":72,"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":["coq-formalization","formal-languages","formal-methods","ontologies","semantics"],"created_at":"2025-08-08T12:16:34.331Z","updated_at":"2025-08-08T12:16:36.639Z","avatar_url":"https://github.com/ComFreek.png","language":"Coq","readme":"# Basic Ontology Language: an experimental ontology language in Coq with many semantics\n\nThe **B**asic **O**ntology **L**anguage (BOL) is a toy language for designing ontologies made-up for educational purposes in a course on [knowledge representation and processing (WuV)](https://kwarc.info/courses/wuv/) by [Michael Kohlhase](https://kwarc.info/people/mkohlhase/) and [Florian Rabe](https://kwarc.info/people/frabe/).\n\nThis repository formalizes BOL and gives\n- a deductive semantics for BOL given by a derivation calculus\n- a semantics BOL -\u003e FOL\n- a semantics BOL -\u003e SQL\n- a semantics FOL -\u003e [TPTP](http://www.tptp.org/) (an interface language to feed FOL automatic theorem provers)\n\nSample BOL ontology as a Coq definition (and using a lot of notations):\n\n```coq\nDefinition sampleOntology : bolOntology :=\n  SIGNATURE \n    CON \"professor\" ;;\n    CON \"lecturer\" ;;\n    CON \"course\" ;;\n    REL \"teaches\" ;;\n    REL \"responsible for\" ;;\n    \n    IND \"FR\" ;;\n    IND \"WuV\" ;;\n  END\n  THEORY\n    \"FR\" \u003c.\"teaches\" u \"responsible for\".\u003e \"WuV\" ;;\n    \"lecturer\" == \"professor\" ;;\n  END.\n\nDefinition sampleQuery: bolQuery := (sampleOntology, \"WuV\" IS-A \"course\").\n\nDefinition bolQueryToTPTP := tptpQueryToString ∘ folQueryToTPTP ∘ bolQueryToFol.\nCompute (bolQueryToTPTP sampleQuery).\n```\n\nHere, we see a semantics construction from BOL to FOL, to TPTP, and finally to a string.\nThe output is:\n\n```\n= \"fof(0, axiom, ects(wuv, s(s(s(s(s(z))))))).\n   fof(1, axiom, hard(wuv, false)).\n   fof(2, axiom, course(wuv)).\n   fof(3, axiom, taughtat(wuv, fau)).\n   fof(4, axiom, lecturer(fr)).\n   fof(5, axiom, ?[Z] : ((teaches(fr, Z)) \u0026 (taughtat(Z, fau)))).\n   fof(6, axiom, ![X] : ((lecturer(X)) =\u003e (![Y] : ((teaches(X, Y)) =\u003e (course(Y)))))).\n\n   fof(query, conjecture, course(wuv)).\"\n\n     : string\n```\n\nThis TPTP document can then be fed, for instance, to the [Vampire](https://vprover.github.io/) automatic theorem prover.\n\n## Building and Usage\n\nInstall Coq and run\n\n```\ncoqc utils.v -R . bol\ncoqc bol.v -R . bol\ncoqc bolcalc.v -R . bol\ncoqc fol.v -R . bol\ncoqc sql.v -R . bol\n\ncoqc boltofol.v -R . bol\ncoqc foltotptp.v -R . bol\ncoqc boltosql.v -R . bol\n\ncoqc main.v -R . bol\n```\n\nCopyable one-liner for PowerShell:\n\n```\ncoqc utils.v -R . bol;coqc bol.v -R . bol;coqc bolcalc.v -R . bol;coqc fol.v -R . bol;coqc sql.v -R . bol;coqc boltofol.v -R . bol;coqc foltotptp.v -R . bol;coqc boltosql.v -R . bol;coqc main.v -R . bol;\n```\n\nThen you can seamlessly open `main.v` in CoqIDE (or other Coq IDEs) and step through it!\n\n*TODO:* improve build system.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomfreek%2Fbasic-ontology-language","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomfreek%2Fbasic-ontology-language","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomfreek%2Fbasic-ontology-language/lists"}