Skip to content

Improvements to predicate_property/2 #2902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 40 commits into
base: rebis-dev
Choose a base branch
from

Conversation

triska
Copy link
Contributor

@triska triska commented Apr 21, 2025

The motivation for this is #2898.

However, throwing instantiation errors for variable module leads to Scryer crashing on startup. This must be addressed before merging.

If anyone has any input on this, I would greatly appreciate it. Thank you a lot!

mthom and others added 30 commits April 12, 2025 00:02
This one was a toughie: it turns out that using `ptr::align_of()`` was
a bad idea, since the buffer in `Heap` itself is not aligned to
`Heap::heap_cell_alignment()`, so `ptr::align_of()` would sometimes
return lower values than expected.

That made for an heisenbug: if the alignment of the heap happened to be 4,
then the bug wouldn't trigger.
This reverts commit 3b58798.
triska and others added 10 commits April 17, 2025 22:19
rebis-dev makes the speed difference especially apparent due to the
linear scan of strings on the heap in partial_string_tail/2 which is
now avoided for repositionable streams, notably files.

This addresses mthom#2888 reported and analyzed by @haijinSk. Many thanks!
ENHANCED: dedicated faster branches for repositionable streams
This addresses mthom#2898 reported by @rotu. Thank you a lot!

It now also supports nested module qualifications.
I expect that check_predicate_property/5 may crash or yield wrong
results for variable Module in general.

This must be addressed before merging.
@rotu
Copy link
Contributor

rotu commented May 16, 2025

The commit history makes it very hard for me to tell what's going on in this PR. I think rebis-dev must have been rebased after this PR was created. If it's not too much trouble, could you please rebase this PR?

@bakaq
Copy link
Contributor

bakaq commented May 16, 2025

@rotu
Copy link
Contributor

rotu commented May 16, 2025

@bakaq Thanks, you're right. Those commits even cherry-pick cleanly onto master.

@rotu
Copy link
Contributor

rotu commented May 16, 2025

BTW, if you drop the rebis-dev commits from this branch, GitHub Actions still default to running against the anticipated merge:

https://github.com/mthom/scryer-prolog/actions/runs/14579523803/job/40892946221?pr=2902#step:2:62> Checking out the ref

/usr/bin/git checkout --progress --force refs/remotes/pull/2902/merge

That is, it's cleaner to fork master (or some commit you expect to never get written out of the history), even if it's not the branch your PR targets.

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.

5 participants