summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorB. Bergeron <[email protected]>2025-03-25 01:17:02 -0400
committerB. Bergeron <[email protected]>2025-03-25 02:18:40 -0400
commit561874f8fa0b0bb3fc04e1e16d8601e53fab1902 (patch)
tree07b13a4a416796550e78ce9e30743ba3830481b7 /README
Initial commitHEADmaster
Diffstat (limited to 'README')
-rw-r--r--README42
1 files changed, 42 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..177543a
--- /dev/null
+++ b/README
@@ -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.
+