Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiranandcode/swipl-ocaml
SWI-Prolog Bindings for OCaml: https://gopiandcode.github.io/SWIPL-OCaml/swipl/index.html
https://github.com/kiranandcode/swipl-ocaml
logic ocaml prolog
Last synced: 26 days ago
JSON representation
SWI-Prolog Bindings for OCaml: https://gopiandcode.github.io/SWIPL-OCaml/swipl/index.html
- Host: GitHub
- URL: https://github.com/kiranandcode/swipl-ocaml
- Owner: kiranandcode
- License: gpl-3.0
- Created: 2021-12-08T07:14:26.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-08T07:48:48.000Z (almost 3 years ago)
- Last Synced: 2024-07-20T19:13:06.752Z (4 months ago)
- Topics: logic, ocaml, prolog
- Language: OCaml
- Homepage:
- Size: 85 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# SWIPL-OCaml
SWIProlog bindings for OCaml (for SWIProlog version 8.5).
```ocaml
(* initialise SWIProlog *)
let () = Swipl.initialise ()
(* setup the prolog database with some facts *)
let () = Swipl.load_source "hello :- writeln('hello world')."
(* construct a Swipl term in OCaml *)
let hello = Swipl.Syntax.(!"hello")
(* send the term to the Prolog engine *)
let () = Swipl.with_ctx @@ fun ctx -> Swipl.call ctx hello
```Check out the [Documentation page](https://gopiandcode.github.io/SWIPL-OCaml/swipl/index.html) for a detailed introduction and quick start guide!
If you know what you're doing already, then maybe check out the
example uses under `examples/`.