Skip to content

Prepare release candidate#15

Open
ekaf wants to merge 6 commits intoWNprolog-3.1from
rel317
Open

Prepare release candidate#15
ekaf wants to merge 6 commits intoWNprolog-3.1from
rel317

Conversation

@ekaf
Copy link
Owner

@ekaf ekaf commented Jan 25, 2026

Summary of Updates

This pull request prepares the repository for a new release and incorporates the following improvements:

  1. Fix for stacked_output_streams (close #14):
    Corrected the defective handling of stacked output streams. Previously, nested tell/told calls could fail on some Prolog systems. The fix ensures that streams are properly closed, reused, or garbage-collected as needed, preventing any unnecessary resource consumption.

  2. Optimized Transitive Closure (dynamic visited-set backend):
    Added an alternative transitive-closure backend that tracks visited nodes using a dynamic visited/1 predicate. On Prolog systems with well-indexed dynamic predicates (amortized O(1) lookup/assert), the closure traversal runs in O(E+V) for the reachable subgraph; result collection and cleanup add O(V), so overall remains O(E+V).
    This is compared against the existing ordered-list visited-set approach based on ord_memberchk/2 + ord_insert/3 (from utils.pl portability code / ordsets). For list-based ordsets, membership and insertion are O(|Visited|) worst-case (with early cutoff due to ordering), giving worst-case O(E·V + V²) per closure, though it can still be faster in practice on some systems (notably SWI and Trealla) due to dynamic database overheads.

  3. SPDX File Headers for Licensing Compliance:
    Introduced machine-readable SPDX identifiers at the top of all source files to explicitly declare their licensing terms. This change clarifies downstream compliance requirements and aligns with modern practices for open-source repositories.

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.

tell/1 and told/0 are not defined in Standard Prolog

1 participant