Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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/`.