Skip to content

Comment on Curry: A functional logic programming languageparent

Comments

> ?- phrase(pal, "racecar") true.

Off the top of my head but I think that should be backticks, not double quotes? So that `racecar` is read as a list of characters? I might try it later.

> Prolog goes in order, and goes deep. This is notoriously problematic, because it's incomplete.

Yes, because it can get stuck in left-recursive loops. On the upside that makes it fast and light-weight in terms of memory use. Tabled execution with memoization (a.k.a. SLG-Resolution) avoids incompleteness but trades off time for space so you now risk running out of RAM. There's no perfect solution.

Welcome to classical AI. Note the motto over the threshold: "Soundness, completeness, efficiency: choose two".

To me --> looks like DCG and should work with ", if whatever the flag is called, is set. Scryer has it set by default now, I think. At least it was some time ago I had to look it up and set it myself.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.