diff options
author | B. Bergeron <[email protected]> | 2025-03-25 01:17:02 -0400 |
---|---|---|
committer | B. Bergeron <[email protected]> | 2025-03-25 02:18:40 -0400 |
commit | 561874f8fa0b0bb3fc04e1e16d8601e53fab1902 (patch) | |
tree | 07b13a4a416796550e78ce9e30743ba3830481b7 /README |
Diffstat (limited to 'README')
-rw-r--r-- | README | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -0,0 +1,42 @@ +uswipl - dumbed-Down SWI-Prolog REPL +==================================== +uswipl is a dumbed-down, IPC-friendly Prolog REPL built on top of SWI-Prolog. + +Requirements +------------ +To build uswipl, you need SWI-Prolog installed. + +Installation +------------ +Enter the following command to build uswipl: + + make uswipl + +Running uswipl +-------------- +uswipl takes the same arguments as `swipl(1)`, it's REPL only allows two types +of interactions: + +1. Assertions, which are done by entering an exclamation mark followed by a + term, e.g.: + + !a :- b + +2. Queries on unary predicates, which are done by entering a question mark + followed by a predicate name. uswipl will then proceed to print each result + for that predicate, one per line. e.g.: + + ?mypred + +uswipl will terminate on error, misinput, upon receiving a signal, or when +reading EOF from stdin. + +Ok, but why? +------------ +Because (SWI/GNU) Prolog is awesome but a pain to call from other languages. The C API is +what it is, and the REPL doesn't seem to have been built with IPC in mind. + +You can start uswipl from any other programming language, provide an init `-f` +or a state `-x` file containing your main Prolog logic, and, through a few +queries and assertions, be done with gluing your software together. + |