# Data Structure

**URL:** https://swi-prolog.discourse.group/c/help/data-structure/23.md?page=1

[Latest](https://swi-prolog.discourse.group/latest.md) · [Categories](https://swi-prolog.discourse.group/categories.md) · [Tags](https://swi-prolog.discourse.group/tags.md)

**Page:** 2

---

## [Operate Knowledge Base Dynamically with JPL](https://swi-prolog.discourse.group/t/operate-knowledge-base-dynamically-with-jpl/3405)

<div class="topic-metadata">

**Author:** [@TramsWang](https://swi-prolog.discourse.group/u/TramsWang)\
**Replies:** 1\
**Last updated:** [December 21, 2020, 12:32pm UTC](https://swi-prolog.discourse.group/t/operate-knowledge-base-dynamically-with-jpl/3405 "2020-12-21T12:32:48Z")

</div>

Hi. I’m using JPL to operate a knowledge base dynamically. However I cannot find any resources that tells me how to do that. For example, I can use the following code to create a new fact and append it to KB: Atom a = …

---

## [Access time and data structures](https://swi-prolog.discourse.group/t/access-time-and-data-structures/2855)

<div class="topic-metadata">

**Author:** [@moraneus](https://swi-prolog.discourse.group/u/moraneus)\
**Replies:** 7\
**Last updated:** [September 1, 2020, 11:49am UTC](https://swi-prolog.discourse.group/t/access-time-and-data-structures/2855 "2020-09-01T11:49:40Z")

</div>

What are the types of data structure and the access time in the best / average / worst cases? In a list is pretty simple, I need to run through all items until I find the specific one I wanted. What happens with facts?…

---

## [Quick basic list questions. Not a test just checking what I believe to be correct](https://swi-prolog.discourse.group/t/quick-basic-list-questions-not-a-test-just-checking-what-i-believe-to-be-correct/2621)

<div class="topic-metadata">

**Author:** [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Replies:** 11\
**Last updated:** [July 11, 2020, 2:09pm UTC](https://swi-prolog.discourse.group/t/quick-basic-list-questions-not-a-test-just-checking-what-i-believe-to-be-correct/2621 "2020-07-11T14:09:17Z")

</div>

There are closed list which end with \[\] and open list which end with a variable, e.g. Closed list AKA list ?- write\_term(\[a,b,c\],\[dotlists(true)\]). .(a,.(b,.(c,\[\]))) true. Open list AKA Partial list ?- write\_term(\[a…

---

## [How to use or create AVL tree sets analog to assoc maps?](https://swi-prolog.discourse.group/t/how-to-use-or-create-avl-tree-sets-analog-to-assoc-maps/2434)

<div class="topic-metadata">

**Author:** [@BlondMammuth](https://swi-prolog.discourse.group/u/BlondMammuth)\
**Replies:** 9\
**Last updated:** [May 30, 2020, 7:02pm UTC](https://swi-prolog.discourse.group/t/how-to-use-or-create-avl-tree-sets-analog-to-assoc-maps/2434 "2020-05-30T19:02:06Z")

</div>

I am really happy about the lib(assoc), because partly that is exactly what I need for my project. However, I also need AVL tree sets. Is there a lib that provides these, or can they be derived from the assoc lib somehow…

---

## [Does SWI-Prolog have N+K-trees?](https://swi-prolog.discourse.group/t/does-swi-prolog-have-n-k-trees/1310)

<div class="topic-metadata">

**Author:** [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Replies:** 10\
**Last updated:** [January 22, 2020, 8:24am UTC](https://swi-prolog.discourse.group/t/does-swi-prolog-have-n-k-trees/1310 "2020-01-22T08:24:32Z")

</div>

Does SWI-Prolog have N+K trees? Found library(nb\_set) (GitHub) and logk\_ith/4 in library(dialect/xsb/basics) and many more data structures, so before testing them out figured it couldn’t hurt to also just ask. tl;…

[Previous page](https://swi-prolog.discourse.group/c/help/data-structure/23.md)
