Skip to content

hash_consing 0.2.1: PlDoc, README and FIXME improvements - #4

Merged
Atry merged 6 commits into
mainfrom
release-0.2.2
Oct 1, 2026
Merged

Atry merged 6 commits into
mainfrom
release-0.2.2

Conversation

@Atry

@Atry Atry commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

One release with every improvement since 0.2.0. The library's code is unchanged; this release changes comments, the README and one test fixture.

Changes

  • PlDoc. The pack server showed no documentation on any predicate. Every %! comment carried its description on the mode line (%! intern(?Term, ?Id) Id is ...), which PlDoc rejects with "failed to process structured comment". Each mode line now stands alone, and the description follows after a blank comment line. Loaded with doc_collect(true), the library raises no PlDoc warning, and all seven exports have summaries. test/hash_consing.plt gets the same layout.
  • The order of Ids is stated behaviour. The module comment's FIXME on the order of two Ids is deleted. Rule (2) for a file that opts in, which already forbids reading that order, now says that the standard order of two Ids depends on the history of insertions into the store, not on their terms.
  • One way to write the directive. The README keeps each rewritten/1 directive, with the use_module of the library, in a file of its own that every module using the terms includes. It warns that a file which does not include the directive keeps plain terms, so its heads fail to unify with the Ids, silently. The module comment's opt-in paragraph says the same. The fixture patterns.pl now includes patterns_templates.pl, which the README quotes; its snapshot is unchanged.
  • FIXME cleanup.
    • The FIXME on an Id written into a clause no longer says that the store lives in one thread's global variable: a thread that installs the loading thread's store reads such an Id.
    • The FIXME on trie_lookup/3 failing silently near a full stack is removed. It was observed once, in another program, before this pack existed, and two later probes did not reproduce it.
    • The FIXME on a forged handle stays: '__hash_consed_apply/2'(42) still crashes SWI-Prolog 10.0.2 with status 139.
  • version('0.2.1').

This replaces #3, which is closed. The branch name says 0.2.2 because 0.2.1 and 0.2.2 were first split into two releases.

Checks

  • All 65 tests pass.
  • With comment lines removed, prolog/hash_consing.pl is identical to 0.2.0.

🤖 Generated with Claude Code

Atry added 6 commits October 1, 2026 02:07
Every %! comment carried its description on the mode line, which PlDoc
rejects, so the pack server showed no documentation on any predicate. Each
mode line now stands alone and the description follows it. Comments only;
the code is unchanged.
…IXME

The module comment's FIXME on the order of Ids is deleted; the rule for a
file that opts in now says that the standard order of two Ids depends on
the history of insertions into the store.
The README and the module comment warn that the rewrite is per file and
show one directive file included by every module that hands the terms to
another.
The FIXME on an Id written into a clause no longer says the store lives in
one thread's global variable: threads that install the loading thread's
store read it. The FIXME on a silent trie_lookup/3 failure near a full
stack is removed: it was seen once, in another program, and two later
probes did not reproduce it.
The README keeps each rewritten/1 directive in a file of its own that every
module using the terms includes, and warns that a file that does not
include it fails silently. The fixture patterns.pl includes its templates
the same way.
The version is 0.2.1: everything since 0.2.0 ships in one release.
@Atry Atry changed the title hash_consing 0.2.2: FIXME cleanup hash_consing 0.2.1: PlDoc, README and FIXME improvements Oct 1, 2026
@Atry
Atry merged commit 2799f5a into main Oct 1, 2026
3 checks passed
@Atry
Atry deleted the release-0.2.2 branch October 1, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant