trealla-prolog / trealla

A compact, efficient Prolog interpreter written in plain-old C.
MIT License
274 stars 13 forks source link

Support CLP(B) #564

Open jgarte opened 4 months ago

jgarte commented 4 months ago

Hi,

Is supporting CLP(Z) just a matter of vendoring in Markus Triska's clpz.pl file?

What would be required at the lower level C code in order to support it.

Any orientative explanation of what would be required would be much appreciated so I can then dig deeper into understanding the requirements.

all best,

jgart

infradig commented 4 months ago

Hi, I'm not sure what you mean, as library/clpz.pl is already included in the Trealla release.

On Sat, 6 July 2024, 09:00 Jorge Gomez, @.***> wrote:

Hi,

Is supporting CLP(Z) just a matter of vendoring in Triska's clpz.pl https://github.com/triska/clpz/blob/master/clpz.pl file?

What would be required at the lower level C code in order to support it.

I'm trying to understand the requirements.

Any orientative explanation of what would be required would be much appreciated.

all best,

jgart

— Reply to this email directly, view it on GitHub https://github.com/trealla-prolog/trealla/issues/564, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFNKSER3W7EKANHRB76XQJTZK4QRTAVCNFSM6AAAAABKN3COEOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4TGMRRG44DCMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jgarte commented 4 months ago

Oops, for some reason I thought it was not included yet. I must have missed that file when looking.

Is there any further work to do on clpz.pl in trealla or is it at feature parity with scryer's support for CLP(Z)?

infradig commented 4 months ago

As far as I can tell it works as expected. CLP(B) however is still missing as it doesn't work properly yet.

On Sat, 6 July 2024, 10:20 Jorge Gomez, @.***> wrote:

Oops, for some reason I thought it was not included yet. I forgot to check that.

Is there any further work to do on clpz.pl in trealla or is it at feature parity with scryer?

— Reply to this email directly, view it on GitHub https://github.com/trealla-prolog/trealla/issues/564#issuecomment-2211532365, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFNKSEWCBLUB5RVEJIV7RULZK4Z35AVCNFSM6AAAAABKN3COEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGUZTEMZWGU . You are receiving this because you commented.Message ID: @.***>

jgarte commented 4 months ago

Thanks for the info! That's great that CLP(Z) is working as expected on trealla. I'm looking forward to using the library more as I am currently learning declarative integer arithmetic.

What's left to do on CLP(B) or what is the current difficulty with it?

infradig commented 4 months ago

Unknown problem that I can't seem to get to the bottom of. I'll return to it soon. CLP(B) & Tabling are the outstanding problems.

On Sat, 6 July 2024, 10:25 Jorge Gomez, @.***> wrote:

What's left to do on CLP(B) or what is the currently difficulty with it?

— Reply to this email directly, view it on GitHub https://github.com/trealla-prolog/trealla/issues/564#issuecomment-2211535579, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFNKSETEZ3OICSADNO3BJULZK42P7AVCNFSM6AAAAABKN3COEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGUZTKNJXHE . You are receiving this because you commented.Message ID: @.***>

jgarte commented 4 months ago

I've changed this issue name to "Support CLP(B)" since I saw that there is no ticket open for it currently.

jgarte commented 4 months ago

What is Tabling? Can you point me to a reference on tabling so that I can orient myself to it. Thanks!

jgarte commented 4 months ago

You mean this?

https://en.wikipedia.org/wiki/Tabled_logic_programming

infradig commented 4 months ago

Yes, the Scryer code for tabling should be portable but doesn't work.

On Sat, 6 July 2024, 10:31 Jorge Gomez, @.***> wrote:

You mean this?

https://en.wikipedia.org/wiki/Tabled_logic_programming

— Reply to this email directly, view it on GitHub https://github.com/trealla-prolog/trealla/issues/564#issuecomment-2211539249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFNKSESAN372TYP2AUVPVZDZK43G5AVCNFSM6AAAAABKN3COEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGUZTSMRUHE . You are receiving this because you commented.Message ID: @.***>

jgarte commented 4 months ago

Oh, ok

https://www.scryer.pl/tabling