From e88fae1aa94743b0596a60b9ff3798753c1027c0 Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Mon, 8 Dec 2025 11:01:00 +0100 Subject: added prolog directory --- .gitignore | 2 ++ prolog/README.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 prolog/README.md diff --git a/.gitignore b/.gitignore index 1972246..55a082b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ .lsp node_modules/ *.ts# +\#* +.\#* diff --git a/prolog/README.md b/prolog/README.md new file mode 100644 index 0000000..d9d6ca0 --- /dev/null +++ b/prolog/README.md @@ -0,0 +1,19 @@ +# Implementing Prolog + +## Basics + +* terms: + * variables start with upper casae: `X`, `Y`... + * symbols start with lower case: `s`, `z`, `child`, ... + * symbols have arity 0 or more : `bob`, `child(X, Y)`, `father(bob, Z)`... +* clauses: + * _head_: a single term + * _premises_: a (possibly empty) list of terms +* a _data set_ is a list of clauses +* _queries_ are + +## References + +* [NanoProlog](https://github.com/norm2782/NanoProlog) +* [hslogic](https://github.com/abailly/hslogic) +* [miniprolog](https://github.com/andrejbauer/plzoo/tree/master/src/miniprolog) -- cgit v1.3.1