Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.prolog > #14424
| From | Mild Shock <janburse@fastmail.fm> |
|---|---|
| Newsgroups | comp.lang.prolog |
| Subject | DCG Translation with Unification Spillling (Was: Is old school mode directed compilation dead?) |
| Date | 2025-01-25 20:44 +0100 |
| Message-ID | <vn3eu1$fmq0$1@solani.org> (permalink) |
| References | (3 earlier) <vc7mjb$9ptr$1@solani.org> <vcelid$b5f1$3@solani.org> <vihokt$lrea$1@solani.org> <vn0gpc$dlcd$1@solani.org> <vn0gqt$dlcd$2@solani.org> |
Hi,
Lets say there are at least two unification
spilling rewriting techniques in a Prolog system
that would eliminate a (=)/2 call:
/* Left Spilling into the Head */
p(V, Q) :- V = T, ... ~~> p(T, Q) :- ...
/* Right Spilling into a Goal */
..., V = T, p(V, Q), ... ~~> ..., p(T, Q), ...
Maybe the head movement and the indexing benefit
in SWI-Prolog was discovered because of DCG translation
and not to eliminate mode directed compilation.
Take this DCG rule:
p --> [a], !, [b].
I find that SWI-Prolog does left spilling:
/* SWI-Prolog 9.3.19 */
?- listing(p/2).
p([a|A], B) :-
!,
C=A,
C=[b|B].
Bye
Mild Shock schrieb:
> Hi,
>
> Would need more testing but the
> present example is immune:
>
> /* SWI-Prolog 9.3.19 */
> ?- X = f(g(1),h(2)), time((between(1,1000000,_), test1(X, Y), fail; true)).
> % 1,999,998 inferences, 0.094 CPU in 0.100 seconds (93% CPU, 21333312 Lips)
>
> ?- X = f(g(1),h(2)), time((between(1,1000000,_), test2(X, Y), fail; true)).
> % 1,999,998 inferences, 0.094 CPU in 0.100 seconds (93% CPU, 21333312 Lips)
>
> ?- Y = j(1,2), time((between(1,1000000,_), test1(X, Y), fail; true)).
> % 1,999,998 inferences, 0.109 CPU in 0.100 seconds (109% CPU, 18285696
> Lips)
>
> ?- Y = j(1,2), time((between(1,1000000,_), test2(X, Y), fail; true)).
> % 1,999,998 inferences, 0.094 CPU in 0.102 seconds (92% CPU, 21333312 Lips)
>
> Not all Prolog systems are that lucky:
>
> /* Scryer Prolog 0.9.4-286 */
> ?- X = f(g(1),h(2)), time((between(1,1000000,_), test1(X, Y), fail; true)).
> % CPU time: 1.163s, 11_000_108 inferences
>
> ?- X = f(g(1),h(2)), time((between(1,1000000,_), test2(X, Y), fail; true)).
> % CPU time: 1.248s, 11_000_131 inferences
>
> ?- Y = j(1,2), time((between(1,1000000,_), test1(X, Y), fail; true)).
> % CPU time: 0.979s, 11_000_131 inferences
>
> ?- Y = j(1,2), time((between(1,1000000,_), test2(X, Y), fail; true)).
> % CPU time: 1.338s, 11_000_131 inferences
>
> Bye
Back to comp.lang.prolog | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-06-04 07:49 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-06-20 08:20 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-06-21 03:24 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-06-23 02:14 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-06-24 15:25 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-07-29 17:58 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-08-01 06:48 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-08-01 06:54 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-08-01 07:31 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-08-02 02:02 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-08-02 02:14 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-08-02 02:20 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-08-15 07:34 -0700
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-11-20 05:23 -0800
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-11-20 09:01 -0800
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-11-25 07:23 -0800
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-11-25 13:10 -0800
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-11-27 09:31 -0800
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-11-28 21:47 -0800
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-11-28 21:58 -0800
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-11-28 23:33 -0800
Re: The road to Artificial Intelligence Mild Shock <bursejan@gmail.com> - 2023-11-30 15:43 -0800
Zero Tokens comming out of me (Re: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-10-30 16:47 +0100
FYI: New Journal NAI (Was: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-11-06 17:18 +0100
The Bee Clock Model (Re: FYI: New Journal NAI) Mild Shock <janburse@fastmail.fm> - 2024-11-06 17:41 +0100
ChatGPT for the Flintstones: Bloomberg (Re: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-11-11 22:34 +0100
Silicon Valley is the new Detroit (Re: ChatGPT for the Flintstones: Bloomberg) Mild Shock <janburse@fastmail.fm> - 2025-02-18 18:13 +0100
Re: Silicon Valley is the new Detroit (Re: ChatGPT for the Flintstones: Bloomberg) Mild Shock <janburse@fastmail.fm> - 2025-02-18 18:14 +0100
Minimal Logics in the 2020's: A Meteoric Rise (Was: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-07-04 23:09 +0200
The curse of Negri & Plato (Was: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-07-05 03:52 +0200
Re: The curse of Negri & Plato (Was: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-07-05 03:54 +0200
Euklid: Am I a joke to you? (Re: The curse of Negri & Plato) Mild Shock <janburse@fastmail.fm> - 2024-07-13 08:21 +0200
Re: Minimal Logics in the 2020's: A Meteoric Rise (Was: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-07-05 06:38 +0200
Re: Minimal Logics in the 2020's: A Meteoric Rise (Was: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-07-07 23:13 +0200
Re: Minimal Logics in the 2020's: A Meteoric Rise (Was: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-07-07 23:17 +0200
French Philosophy in 2024 (Was: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-07-12 11:27 +0200
Re: French Philosophy in 2024 (Was: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-07-12 11:37 +0200
Corona isn't over 2024 (Was: French Philosophy in 2024) Mild Shock <janburse@fastmail.fm> - 2024-07-12 12:20 +0200
Re: Corona isn't over 2024 (Was: French Philosophy in 2024) Mild Shock <janburse@fastmail.fm> - 2024-07-12 12:36 +0200
The error in Jan von Platos presentation (Re: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-07-13 10:33 +0200
Re: The error in Jan von Platos presentation (Re: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-07-13 10:58 +0200
Re: The error in Jan von Platos presentation (Re: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-07-14 00:05 +0200
Re: The error in Jan von Platos presentation (Re: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-07-14 00:14 +0200
Distinction between Computation & Derivation (Was: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-07-22 12:55 +0200
Prolegomena by Rappaport (Re: Minimal Logics in the 2020's: A Meteoric Rise (Was: The road to Artificial Intelligence)) Mild Shock <janburse@fastmail.fm> - 2024-07-31 22:15 +0200
2nd Cognitive Turn ~~> no Bayesian Brain (Re: Prolegomena by Rappaport) Mild Shock <janburse@fastmail.fm> - 2024-08-03 22:50 +0200
Ok I made a joke, sorry (e: 2nd Cognitive Turn ~~> no Bayesian Brain) Mild Shock <janburse@fastmail.fm> - 2024-08-03 23:29 +0200
Re: Ok I made a joke, sorry (e: 2nd Cognitive Turn ~~> no Bayesian Brain) Mild Shock <janburse@fastmail.fm> - 2024-08-03 23:55 +0200
bullshit bullshit bullshit (Re: Ok I made a joke, sorry) Mild Shock <janburse@fastmail.fm> - 2024-08-04 00:14 +0200
The two rules (Was: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-08-04 00:57 +0200
"Emotional AI" and "Spiritual AI" (Re: Minimal Logics in the 2020's: A Meteoric Rise) Mild Shock <janburse@fastmail.fm> - 2024-10-03 12:28 +0200
Oh shit, too late! (Re: "Emotional AI" and "Spiritual AI" (Re: Minimal Logics in the 2020's: A Meteoric Rise)) Mild Shock <janburse@fastmail.fm> - 2024-10-03 12:40 +0200
LLM and Prolog, a Marriage in Heaven? (Was: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-08-04 22:10 +0200
The anchoring problem in a real world philosopher (Was: LLM and Prolog, a Marriage in Heaven?) Mild Shock <janburse@fastmail.fm> - 2024-08-08 16:56 +0200
Long life learning also for real world philosophers? (Re: The anchoring problem in a real world philosopher) Mild Shock <janburse@fastmail.fm> - 2024-08-08 17:18 +0200
Prolog for the pre frontal context (PFC) (Was: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-08-28 17:28 +0200
Re: Prolog for the pre frontal cortex (PFC) (Was: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-08-28 17:31 +0200
No time for the hairdresser betweeen 09.06.2023 and 11.07.2024 (Re: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-09-01 16:43 +0200
Holy Shit: AI is cheaper than Humans (Was: The road to Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-09-01 22:38 +0200
AI robots from Disney (Was: Holy Shit: AI is cheaper than Humans) Mild Shock <janburse@fastmail.fm> - 2024-09-01 23:17 +0200
I can't stand Mira Murati's Eyewash (Was: AI robots from Disney (Was: Holy Shit: AI is cheaper than Humans)) Mild Shock <janburse@fastmail.fm> - 2024-09-03 12:01 +0200
After blue, green why not start yellow (Re: I can't stand Mira Murati's Eyewash) Mild Shock <janburse@fastmail.fm> - 2024-09-03 17:56 +0200
miramurati bye bye (Re: After blue, green why not start yellow) Mild Shock <janburse@fastmail.fm> - 2024-09-25 22:09 +0200
Im memoriam Doug Lenant (1950 - 2023) (Re: miramurati bye bye) Mild Shock <janburse@fastmail.fm> - 2024-12-01 00:56 +0100
2026 the Year Prolog **plonked** Itself [Strawberry Prolog is back] (Was: Im memoriam Doug Lenant (1950 - 2023)) Mild Shock <janburse@fastmail.fm> - 2026-02-04 02:20 +0100
Spies and Playboys: Don't use insecure E-mail [https://www.jmail.world/ Example] Mild Shock <janburse@fastmail.fm> - 2026-02-04 11:19 +0100
Some ANTHEM Cringe Nonsense [More Dead Horses] (Was: 2026 the Year Prolog **plonked** Itself [Strawberry Prolog is back]) Mild Shock <janburse@fastmail.fm> - 2026-02-05 09:53 +0100
Gecode: Guns N' Roses - Dead Horse (Was: Some ANTHEM Cringe Nonsense [More Dead Horses]) Mild Shock <janburse@fastmail.fm> - 2026-02-05 10:21 +0100
2026 the Year golang lost its Marbles (Was: 2026 the Year Prolog **plonked** Itself [Strawberry Prolog is back]) Mild Shock <janburse@fastmail.fm> - 2026-02-14 09:53 +0100
Mark V. Shaney caused Julio Di Egidio Suicide (Re: 2026 the Year golang lost its Marble) Mild Shock <janburse@fastmail.fm> - 2026-02-14 12:51 +0100
Is Causal AI simply ReLU (Geoffrey E. Hinton 2010) (Re: Mark V. Shaney caused Julio Di Egidio Suicide) Mild Shock <janburse@fastmail.fm> - 2026-02-17 11:37 +0100
Gen Alpha will grow up with Causal AI (Was: Is Causal AI simply ReLU (Geoffrey E. Hinton 2010)) Mild Shock <janburse@fastmail.fm> - 2026-02-19 20:00 +0100
LRM moving from FOM to TCS [Lean Prover] (Was: Is Causal AI simply ReLU (Geoffrey E. Hinton 2010))) Mild Shock <janburse@fastmail.fm> - 2026-02-27 10:20 +0100
Original Subject established by Chinese Scientists [Extenics] (Re: LRM moving from FOM to TCS [Lean Prover]) Mild Shock <janburse@fastmail.fm> - 2026-02-28 16:36 +0100
DeepSeekMath: From psychophysischer Parallelismus to GPRO (Re: Odysseus PTSD: Does Function need Consistency?) Mild Shock <janburse@fastmail.fm> - 2026-03-06 02:29 +0100
"superhumaness" excels "stackoverflow reputation" (Was: Im memoriam Doug Lenant (1950 - 2023) Mild Shock <janburse@fastmail.fm> - 2024-12-01 01:08 +0100
para-governemental institution of violence (Re: "superhumaness" excels "stackoverflow reputation") Mild Shock <janburse@fastmail.fm> - 2024-12-01 11:42 +0100
Not only $TSLA is on fire sale! [The Decline of Prolog] (Was: "superhumaness" excels "stackoverflow reputation") Mild Shock <janburse@fastmail.fm> - 2025-03-14 13:37 +0100
Re: Not only $TSLA is on fire sale! [The Decline of Prolog] (Was: "superhumaness" excels "stackoverflow reputation") Mild Shock <janburse@fastmail.fm> - 2025-03-14 14:06 +0100
Splitting up the Prologue to Prolog Mild Shock <janburse@fastmail.fm> - 2025-05-19 10:54 +0200
Safe Superintelligence (SSI): Now they are dancing Mild Shock <janburse@fastmail.fm> - 2024-09-05 19:51 +0200
Re: Safe Superintelligence (SSI): Now they are dancing Mild Shock <janburse@fastmail.fm> - 2024-09-05 23:51 +0200
Salem Aleikum: Maxwella's Equations Mild Shock <janburse@fastmail.fm> - 2024-09-09 13:15 +0200
non judicium, sed latrocinium (Re: Salem Aleikum: Maxwella's Equations) Mild Shock <janburse@fastmail.fm> - 2024-09-10 08:58 +0200
Internet was made for cats (Re: Safe Superintelligence (SSI): Now they are dancing) Mild Shock <janburse@fastmail.fm> - 2024-09-13 12:58 +0200
I was there, 3000 years ago (Re: Internet was made for cats) Mild Shock <janburse@fastmail.fm> - 2024-09-13 13:01 +0200
Even Haitians are now voting for Trump (Re: I was there, 3000 years ago (Re: Internet was made for cats)) Mild Shock <janburse@fastmail.fm> - 2024-09-13 13:04 +0200
supply chain attack (Was: Internet was made for cats( Mild Shock <janburse@fastmail.fm> - 2024-09-17 22:18 +0200
Polyfill Supply Chain Attack (Was: supply chain attack) Mild Shock <janburse@fastmail.fm> - 2024-10-11 09:12 +0200
USA is shitting its pants (Was: Holy Shit: AI is cheaper than Humans) Mild Shock <janburse@fastmail.fm> - 2024-09-16 00:20 +0200
scryer prolog is dead, BILAI instead? (Was: USA is shitting its pants) Mild Shock <janburse@fastmail.fm> - 2024-09-18 15:45 +0200
Microsoft is plagiarizing my Invention [LLMs under the hood] Mild Shock <janburse@fastmail.fm> - 2024-10-08 16:00 +0200
Geoffrey Hinton / Nobelpreis für Physik [Re: Microsoft is plagiarizing my Invention [LLMs under the hood]] Mild Shock <janburse@fastmail.fm> - 2024-10-08 16:03 +0200
thank you for the FLOPs (Was: scryer prolog is dead, BILAI instead?) Mild Shock <janburse@fastmail.fm> - 2024-12-01 14:34 +0100
Is old school mode directed compilation dead? (Was: thank you for the FLOPs) Mild Shock <janburse@fastmail.fm> - 2025-01-24 17:57 +0100
Re: Is old school mode directed compilation dead? (Was: thank you for the FLOPs) Mild Shock <janburse@fastmail.fm> - 2025-01-24 17:58 +0100
format/2 doesn't agree with Trealla or SWI (Was: Is old school mode directed compilation dead?) Mild Shock <janburse@fastmail.fm> - 2025-01-25 14:13 +0100
DCG Translation with Unification Spillling (Was: Is old school mode directed compilation dead?) Mild Shock <janburse@fastmail.fm> - 2025-01-25 20:44 +0100
Re: DCG Translation with Unification Spillling (Was: Is old school mode directed compilation dead?) Mild Shock <janburse@fastmail.fm> - 2025-01-25 20:44 +0100
Will WASM be fast some time? (Was: thank you for the FLOPs) Mild Shock <janburse@fastmail.fm> - 2025-03-04 10:09 +0100
Re: Will WASM be fast some time? (Was: thank you for the FLOPs) Mild Shock <janburse@fastmail.fm> - 2025-03-04 10:13 +0100
Book Project: WomanLogic (Re: USA is shitting its pants) Mild Shock <janburse@fastmail.fm> - 2024-11-14 22:25 +0100
Re: Book Project: WomanLogic (Re: USA is shitting its pants) Mild Shock <janburse@fastmail.fm> - 2024-11-14 22:26 +0100
Happy Birthday 75 Years of Artificial Intelligence Mild Shock <janburse@fastmail.fm> - 2024-10-23 01:18 +0200
Does ChatGPT know the difference between "k" and "kkkkkkkkkk"? Mild Shock <janburse@fastmail.fm> - 2024-10-23 01:18 +0200
What is it like to be a Bat? Mild Shock <janburse@fastmail.fm> - 2024-10-23 22:35 +0200
How Monkeys see the World (Re: What is it like to be a Bat?) Mild Shock <janburse@fastmail.fm> - 2024-10-23 22:45 +0200
Low-Code Penetration Prediction (Re: Happy Birthday 75 Years of Artificial Intelligence) Mild Shock <janburse@fastmail.fm> - 2024-10-30 23:09 +0100
csiph-web