Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.prolog > #14988

deep preprocessor =\= term_expansion and/or goal_expansion [SWI-Prolog dicts]

From Mild Shock <janburse@fastmail.fm>
Newsgroups comp.lang.prolog
Subject deep preprocessor =\= term_expansion and/or goal_expansion [SWI-Prolog dicts]
Date 2025-11-12 02:18 +0100
Message-ID <10f0n8q$aq2q$1@solani.org> (permalink)
References <fda96161124.070004@logic.at> <1050b9t$26p2f$1@solani.org> <1050bga$26p4p$1@solani.org> <1050c8d$26pg6$1@solani.org> <10f0k8h$aoi3$1@solani.org>

Show all headers | View raw


Hi,

I am using the same "preprocessor" approach for
arrow functions in Dogelog Player, as sleepy joe
SWI-Prolog uses for SWI-Prolog dicts.

Take this SWI-Prolog dict example:

?- X = #{b:abc,a:123}
X = #{a:123,b:abc}

Where is the dict normalized?

- Not term_expansion: The dict is not
   normalized/sorted in term_expansion, since a
   Query is anyway not a fact or rule, that
   a term_expansion would deal with.

- Not goal_expansion: The dict is not
   normalized/sorted in goal_expansion, since
   although the above (=)/2 goal is indeed
   a goal, but the dict sits in an argument.

- Function_expansion: Some prolog systems
   call it function expansion. It can be used
   for dicts and function on dicts. I had function
   expansion also in formerly Jekejeke Prolog.

So for release 2.1.2 I didn't realize function expansion,
since the arrow functions were ahead of time compiled
in the compiler backend. But for release 2.1.3 there
is not a little function expansion framework in place,

so as to generate the interpretetive translation of
arrow functions. This allows to run arrow functions
with the based on ISO core standard witness
calculation [7.1.1.4] also outside the Dogelog

Player compiler backend ecosystem. Also the
interactive debugger is now based on the interpretative
version, and the same interactive debugger can run
outside of the Dogelog Player compiler backend ecosystem.

Proof of concept of this better portability is a
version of formerly Jekjeke Prolog, that is synced
with Dogelog Player except for the compiler backend.

Bye

P.S.: Scryer calls shallow preprocessor Syntactic macros
(term expansion & goal expansion). Function expansion makes the
preprocessor deep, going to every sub tree of the input tree.

But Prolog has a kind of history, dismissing the shallow
preprocessor in favor of a deep preprocessor. Like for
example this paper from 2002:

https://oa.upm.es/14610/1/HERME_REFWORKS_2005-2.pdf

Mild Shock schrieb:
> Hi,
> 
> How it started:
> ===============
> 
> Sleepy Joe SWI-Prolog still waiting for a PR,
> that include/3, this predicate:
> 
> https://www.swi-prolog.org/pldoc/man?predicate=include/3
> 
> Can ahead of time compile lambda expressions
> from library(yall). This does not yet work.
> 
> And anything else will also not work, especially
> things where a meta predicate declaration is missing.
> 
> How its going:
> ===============
> 
> After I posted arrow functions ahead of time
> compilation, for Doglog Player, which is
> 
> much simpler than the LogNonsenseTalk nonsense
> of library(yall). There was first silence.
> 
> Now they are a little nervous:
> 
> Yall lambdas in asserted clauses
> https://swi-prolog.discourse.group/t/yall-lambdas-in-asserted-clauses/9374
> 
> Advice:
> =======
> 
> Why not tap into Boris the Loris and the Nazi Retard Julio?
> 
> Bye
> 
> Mild Shock schrieb:
>> Hi,
>>
>> I am still convinced Prolog can keep up with the AI Boom.
>> Nothing listed in the Prolog FAQ is really useful to
>> keep up with the AI Boom. Its nice historical footnote.
>>
>> I don't think anything CLAM , i.e. constraint logic
>> abstract machine, will hit the spot of the AI Boom.
>> Prove me wrong if you can. Autodiff with CLAM, holy
>>
>> cow what a nonsense...
>>
>> Bye
>>
>> Mild Shock schrieb:
>>> Hi,
>>>
>>> BTW: I have red taped www.jekejeke.ch on
>>> Wayback Machine . Red Taping is a legal
>>> process which took a few steps, like E-mail
>>>
>>> verification and DNS verifcation, I had to provide the
>>> whole history that I owned www.jekejeke.ch, and it
>>> is not temporary , its irreversible, since I do not
>>>
>>> intend to remove the red tape. But the "red tape"
>>> metaphor is spot on. The content is not actually
>>> deleted from their servers. It is made inaccessible
>>>
>>> to the public. So certain institution if there is a
>>> need might still access it. But if I am run over by
>>> a tram tomorrow, not sure whether I have a good
>>>
>>> Software-Escrow for Jekejeke Prolog. Currently
>>> you can assume that my company XLOG Technologies AG
>>> is resposible for carrying out or delegating the
>>>
>>> Software-Escrow of Jekejeke Prolog. And the company
>>> still exists, it exists in active form, unlike some
>>> other Prolog involved companies.
>>>
>>> Bye
>>>

Back to comp.lang.prolog | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

comp.lang.prolog Frequently Asked Questions Markus Triska <triska@logic.at> - 2024-11-16 05:58 +0000
  Amzi! Retirement: 2026 is only next year (Was: comp.lang.prolog Frequently Asked Questions) Mild Shock <janburse@fastmail.fm> - 2025-07-13 15:11 +0200
    What does the "Red Tape" on Wayback Machine mean? (Was: Amzi! Retirement: 2026 is only next year) Mild Shock <janburse@fastmail.fm> - 2025-07-13 15:14 +0200
      Prolog can keep up with the AI Boom [Forget about CLAM] (Was: What does the "Red Tape" on Wayback Machine mean?) Mild Shock <janburse@fastmail.fm> - 2025-07-13 15:27 +0200
        The cult of CLAM / Clojure rewrite utility (Was: Prolog can keep up with the AI Boom [Forget about CLAM]) Mild Shock <janburse@fastmail.fm> - 2025-07-13 15:43 +0200
          Australian Longest Straight Road in Prolog (Was: Clojure hasn't gained momentum [Martin Odersky 2025 Talk]) Mild Shock <janburse@fastmail.fm> - 2025-07-14 16:11 +0200
            Can CLAM do bidrectional rounding? (Was: Australian Longest Straight Road in Prolog) Mild Shock <janburse@fastmail.fm> - 2025-07-14 16:15 +0200
              Pointed intervals to the rescue [Make CLAM great again] (Was: Can CLAM do bidrectional rounding?) Mild Shock <janburse@fastmail.fm> - 2025-07-15 01:26 +0200
                Corr. Re: Pointed intervals to the rescue [Make CLAM great again] (Was: Can CLAM do bidrectional rounding?) Mild Shock <janburse@fastmail.fm> - 2025-07-15 01:28 +0200
        Sleepy Joe SWI-Prolog still waiting for a PR (Was: Prolog can keep up with the AI Boom [Forget about CLAM]) Mild Shock <janburse@fastmail.fm> - 2025-11-12 01:26 +0100
          deep preprocessor =\= term_expansion and/or goal_expansion [SWI-Prolog dicts] Mild Shock <janburse@fastmail.fm> - 2025-11-12 02:18 +0100
  There is something like SuperPrologs ? [SWI, ECLiPSe, etc..] (Was: comp.lang.prolog Frequently Asked Questions) Mild Shock <janburse@fastmail.fm> - 2025-07-15 13:24 +0200
    Is ISO itself not simply a dialect? (Was: There is something like SuperPrologs ? [SWI, ECLiPSe, etc..]) Mild Shock <janburse@fastmail.fm> - 2025-07-15 13:26 +0200
      Pet project Prolog-Omnibus I don't have any time (Was: Is ISO itself not simply a dialect?) Mild Shock <janburse@fastmail.fm> - 2025-07-15 13:31 +0200
      ANN: Go Fund Me for ISO Core Standard of Prolog (Re: Is ISO itself not simply a dialect?) Mild Shock <janburse@fastmail.fm> - 2025-10-09 18:10 +0200
        Fuck Around and Find Out : SWI-Prolog Forum [Newline FAFO] (Was: ANN: Go Fund Me for ISO Core Standard of Prolog) Mild Shock <janburse@fastmail.fm> - 2025-10-10 09:36 +0200
          Most Prolog Systems didn't solve it yet [Timer Trash] (Was: Fuck Around and Find Out : SWI-Prolog Forum) Mild Shock <janburse@fastmail.fm> - 2025-10-10 09:48 +0200
            Moron @jp-diegidio clueless about Unicode (UAX#14) [Re: Most Prolog Systems didn't solve it yet [Timer Trash] (Was: Fuck Around and Find Out : SWI-Prolog Forum) Mild Shock <janburse@fastmail.fm> - 2025-10-10 10:22 +0200
    ECliPSe Prolog not a SuperProlog (Was: There is something like SuperPrologs ? [SWI, ECLiPSe, etc..]) Mild Shock <janburse@fastmail.fm> - 2025-08-06 08:30 +0200

csiph-web