# Improving Wang's algorithm in Prolog

**URL:** <https://swi-prolog.discourse.group/t/improving-wangs-algorithm-in-prolog/2872>\
**Category:** Algorithm\
**Tags:** how-to\
**Created:** [September 4, 2020, 1:15pm UTC](https://swi-prolog.discourse.group/t/improving-wangs-algorithm-in-prolog/2872 "2020-09-04T13:15:20Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [September 5, 2020, 10:05am UTC](https://swi-prolog.discourse.group/t/improving-wangs-algorithm-in-prolog/2872/16 "2020-09-05T10:05:21Z")

</div>

> [@](#):
>
> Another place is the packages; they are in their own repositories.

While the statement is correct, it hides a problem that can cause a new user some confusion and needs a bit of clarification. The problem is not with the quoted statement but the wording used in the SWI-Prolog documentation.

Currently the way I think of SWI-Prolog code posted at the GitHub repository is of several parts.

1. The low-level C code which is typically in the [/src](https://github.com/SWI-Prolog/swipl-devel/tree/master/src) directory
2. The core Prolog code which is typically in [/boot](https://github.com/SWI-Prolog/swipl-devel/tree/master/boot)
3. The libraries of Prolog code which is typically in [/library](https://github.com/SWI-Prolog/swipl-devel/tree/master/library)
4. The [packages](https://eu.swi-prolog.org/pldoc/doc_for?object=packages) such as ODBC which are listed in [/packages](https://github.com/SWI-Prolog/swipl-devel/tree/master/packages) but the code is in separate repositories under the main SWI-Prolog [repository](https://github.com/SWI-Prolog), e.g. [packages-odbc](https://github.com/SWI-Prolog/packages-odbc). These are selected during the build. When installing SWI-Prolog on Windows with the Wizard they are also referred to as components. ([ref](https://swi-prolog.discourse.group/t/install-swi-prolog-development-version-on-windows-10/1131))
5. [Packs](https://www.swi-prolog.org/pack/list) - which are add-ons and not in the SWI-Prolog repository. These are installed once SWI-Prolog is running.

The key thing to point out is that sometimes `Packs` are noted as `Packages` and that can be confusing. e.g.  
If you do a Google search for `SWI-Prolog packages` you will most likely find the [packs](https://www.swi-prolog.org/pack/list) instead of the [packages](https://eu.swi-prolog.org/pldoc/doc_for?object=packages).

I only understood it when I was corrected for something I wrote in a post and then I took the time to understand it. See: [Library, packages and packs?](https://swi-prolog.discourse.group/t/library-packages-and-packs/1889)

---

_[View the full topic](https://swi-prolog.discourse.group/t/improving-wangs-algorithm-in-prolog/2872)._
