From 28d132c2823d7dfa21190bf746f9f39dd59a40d8 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Thu, 22 Jan 2026 16:41:39 +1300 Subject: States are now custom linked lists --- readme.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 039dc24..089ffee 100644 --- a/readme.md +++ b/readme.md @@ -18,11 +18,6 @@ Most commonly only the main Kompsos package and the Math and Pretty_Print child packages will be needed. Although Collector is also used internally for the basic reification. -Note that efficient culling of intermediate results is an ongoing concern, and -it is recommended to minimise branching when making use of the Math functions. -Do not attempt to run the `houses.adb` example program unless you have a large -amount of free memory, around two gigabytes. - #### Dependencies @@ -95,9 +90,12 @@ 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. -The State datatype and the cache in the Collector package both make use of -Vectors instead of Maps. This is done to reduce memory requirements, and the -difference is considerable. +The State datatype makes use of custom linked lists, and the bookkeeping data +in the Collector package uses a custom directed acyclic graph structure that +reflects the main Goal graph. This is done instead of using Vectors or Maps +from the standard library both to improve speed and reduce memory requirements. +The improvement due to tail sharing is considerable, despite the theoretically +expensive operations involved walking the list to reify a variable. -- cgit