diff options
| -rw-r--r-- | readme.md | 29 |
1 files changed, 17 insertions, 12 deletions
@@ -1,13 +1,13 @@ ## Kompsos -An experimental implementation of [miniKanren](https://minikanren.org/) in Ada, -a language very much unsuited for the exercise due to its lack of support for -the functional programming paradigm. Came about after reading the +An experimental implementation of [miniKanren](https://minikanren.org/). +Written in Ada, a language very much unsuited for the exercise due to its lack +of support for the functional programming paradigm. Came about after reading the [2013 microKanren paper](http://webyrd.net/scheme-2013/papers/HemannMuKanren2013.pdf) -which is quite short, and then noticing that nobody had tried writing it in Ada. -The name Kompsos comes from Greek, meaning "elegant" or "refined" or "dainty" -and is in reference to the microKanren concept of four primitives. +and then noticing that nobody had tried writing it in Ada. The name Kompsos +comes from Greek, meaning "elegant" or "refined" or "dainty" and is in +reference to the microKanren four primitive concept. Typical usage involves declaring a Goal, applying some operations to it including creating a few variable Terms, evaluating that Goal to obtain a @@ -65,7 +65,8 @@ A brief explanation of the package hierarchy: library. Reification into a Multiway_Tree.</li> <li>`Kompsos.Collector` Manual stepthrough evaluation of a Goal to find satisfying States.</li> - <li>`Kompsos.Math` Arithmetic parts of miniKanren prelude.</li> + <li>`Kompsos.Math` Arithmetic parts of miniKanren prelude. Includes extra + Greater Than operations.</li> <li>`Kompsos.Pretty_Print` Conversion of datatypes to Strings, conversion of Goal graphs to the DOT graph desciption language.</li> </ul> @@ -83,12 +84,16 @@ base State and expanding any Conjuncts to more of the graph as they are encountered. The expanded portions, bookkeeping data, and memoised partial results are all discarded once evaluation is complete. -The various cond operations are completely absent, as they do not really make -sense in an object oriented context. Use a Disjunct operation on several Goals -instead. +The various cond operations are completely absent, as this implementation +instead follows microKanren for its core workings. The cond variations do not +really make sense in an object oriented context anyway. Use a Disjunct +operation on several Goals instead. -All the Goal operations beyond the microKanren four take an array of Terms as -input in order to allow for Conjunct to be reasonably implemented. +All the Goal operations beyond those from microKanren take either zero, one, +or an array of Terms as input in order to allow for Conjunct to be reasonably +implemented. The practical implication of this is there will be a lot of use +of the `&` operator when using this library, as can be seen in the example +programs. The State datatype makes use of custom unrolled linked lists, and the bookkeeping data in the Collector package uses a custom directed acyclic graph |
