Skip to content
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

Thun #853

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Thun #853

wants to merge 8 commits into from

Conversation

mthom
Copy link
Owner

@mthom mthom commented Mar 3, 2021

This PR is a continuation of the work of #622.

@mthom
Copy link
Owner Author

mthom commented Mar 3, 2021

This predicate causes several example queries to fail:

free_reg(Reg, reggy(FreePool0, References0, V0), reggy(FreePool, References, V)) --> [],
    { select(Reg, References0, References),
      (  member(Reg, References)  % If reg is still in use
      -> FreePool=     FreePool0, V0=V % we can't free it yet
      ;  FreePool=[Reg|FreePool0], % otherwise we put it back in the pool.
         del_assoc(Reg, V0, _, V)
      )
    }.

I'm not sure how this might work in SWI, but it's called with References0 bound to [], causing select to fail.
Maybe @calroc could comment?

@hurufu
Copy link
Contributor

hurufu commented Jun 25, 2024

I also find this interpreter very elegant – it handles "combinators" using rational trees. Actually I find it tempting to using concepts similar to "Thun" for procedural parts of Prolog programs.

@calroc
Copy link

calroc commented Jun 27, 2024 via email

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.

6 participants