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

Support Trealla #14

Open
jgarte opened this issue Jul 5, 2024 · 6 comments
Open

Support Trealla #14

jgarte opened this issue Jul 5, 2024 · 6 comments

Comments

@jgarte
Copy link

jgarte commented Jul 5, 2024

Hi,

Would you accept a patch to add support for trealla in ediprolog?

@triska
Copy link
Owner

triska commented Jul 6, 2024

Yes absolutely, it would be great to have support for Trealla, one of the newest Prolog systems, also aiming for conformity to the Prolog ISO standard!

The first consideration should be: What are the main differences between the toplevels of Scryer and Trealla Prolog? If they are largely compatible, then setting ediprolog-system to scryer would work also for Trealla. If there are any differences, then ideally the systems can become more compatible.

The ideal solution is described in #2: Implementing in Prolog a toplevel that is portable between different Prolog systems, so that all systems can be treated identically from within Emacs, even though their default toplevels may differ.

@jgarte
Copy link
Author

jgarte commented Jul 6, 2024

Would that ediprolog-system variable value then be called iso instead of scryer or something else?

@jgarte
Copy link
Author

jgarte commented Jul 9, 2024

Seems to work for the true. term in my screenshot above:

image

But it doesn't seem to know about the modules I've imported in my module like clpz 🦆

WDYT?

ediprolog-system is set to scryer and ediprolog-program is set to "/gnu/store/wg2fl6saa1rk0d2ms1js1c57fky6gzw2-trealla-2.53.47/bin/tpl". I packaged trealla for Guix, hence the funny program path.

@triska
Copy link
Owner

triska commented Jul 10, 2024

In this example, clpz is imported only locally in your own module, so not directly available from module user. I think it is the same in Scryer.

One way to solve this is to remove the module/2 declaration at the start of the file tetrachords.pl. You can re-add it after development is finished. Then, you can access clpz either by module-qualifying it: clpz:..., or by importing it yourself also at the toplevel, by evaluating the query ?- use_module(library(clpz)).. You then have it available in the module and also on the toplevel.

@jgarte
Copy link
Author

jgarte commented Jul 10, 2024

Great! That works now using the tpl executable (trealla). Thanks!

image

@jgarte
Copy link
Author

jgarte commented Jul 10, 2024

Where should we go from here?

#2 ?

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

No branches or pull requests

2 participants