| Deutsch English Français Italiano |
|
<101pmka$ccd2$2@solani.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mild Shock <janburse@fastmail.fm> Newsgroups: sci.logic Subject: DCGs are dead: ROKs transformation from FGCS 1982 Date: Wed, 4 Jun 2025 16:53:00 +0200 Message-ID: <101pmka$ccd2$2@solani.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 4 Jun 2025 14:52:58 -0000 (UTC) Injection-Info: solani.org; logging-data="405922"; mail-complaints-to="abuse@news.solani.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0 SeaMonkey/2.53.20 Cancel-Lock: sha1:PNieW6Mkjm43O7KOsnbRnH6WBIQ= X-User-ID: eJwNwgcRwDAMBDBK8fo4cDz5Q2hPMgGhrsKgtj8zqcXDy8cr4Z7hNGvKfuJ0alPMVFC79aVUoDgaLDGX+ANWrRW9 X-Mozilla-News-Host: news://news.solani.org:119 Bytes: 2255 Lines: 36 > Parse the lines using a DCG This was a quite popular subject around the time Fifth Generation Computer Systems (FGCS) in 1982 and made it into a couple of Prolog books from the same decade. It was before the relaunch of FGCS in the form of Stargate in 2025, and from the time were people reading books and not simply asking ChatGPT. One of these Prolog books is THE BOOK by ROK: The Craft of Prolog Richard O’Keefe - 1990 https://mitpress.mit.edu/9780262512275/the-craft-of-prolog/ His DCG somehow assumes there are already tokens, and he then starts discussing these DCG productions: command(delete(File)) --> [rm], file(File). command(copy(From,To)) --> [cp], file(From), file(To). command(print(File)) --> [lpr], file(File). He then basically goes into head scratching rampage about the current state of DCGs at that time, ultimately suggesting some workaround by a cleaner technique that promotes the first token /* ROKs transformation */ command(Cmd) --> [Token], command(Token, Cmd). command(rm, delete(File)) --> file(File). command(cp, copy(From,To)) --> file(From), file(To). command(lpr, print(File)) --> file(File). into argument indexing. Basically obviating the very idea to use the input DCGs in the first place.