# Food for thought: Are there ISO Prolog dialects?

**URL:** <https://discourse.prolog-lang.org/t/food-for-thought-are-there-iso-prolog-dialects/205>\
**Category:** General discussions on Prolog\
**Created:** [September 11, 2026, 12:42pm UTC](https://discourse.prolog-lang.org/t/food-for-thought-are-there-iso-prolog-dialects/205 "2026-09-11T12:42:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![j4n\_bur53](https://discourse.prolog-lang.org/user_avatar/discourse.prolog-lang.org/j4n_bur53/32/62_2.png) [@j4n\_bur53](https://discourse.prolog-lang.org/u/j4n_bur53)\
**Post date:** [September 11, 2026, 12:42pm UTC](https://discourse.prolog-lang.org/t/food-for-thought-are-there-iso-prolog-dialects/205/1 "2026-09-11T12:42:02Z")

</div>

Strictly speaking for every standard that has implementation  
specific parts or extension parts, there are dialects which  
fill in these implementation specific parts or provide these

extension parts. In the ISO Prolog standard some of these  
parts have flags, others don’t have flags, or there is no agreement  
among flags when there are extension efforts. An example

of such a flag is the following. Compare this:

```prolog
/* GNU Prolog 1.5.0 */
?- current_prolog_flag(bounded, X).
X = true.

?- X = 123456789123456789123456789.
error(syntax_error('integer overflow'))

```

To this here:

```prolog
/* SWI-Prolog 10.1.14 */
?- current_prolog_flag(bounded, X).
X = false.

?- X = 123456789123456789123456789.
X = 123456789123456789123456789.

```

I believe such a flag is not only a system flag, but also a  
language flag. Since it determines which integer numbers  
are accepted and which integer numbers are not accepted.

So in as far there are language dialects. But maybe calling  
these parameters “limits” would be more useful. Some  
newer standardization efforts like WebGPU by W3C have a

huge battery of “limits”, that show gestalt information of the  
underlying GPU hardware and/or GPU adapter. They are  
tidy collected in one place, where “limits” have a couple of

meta properties guiding end-users and implementors:

> **WebGPU 3.6.2. Limits - 1 September 2026**  
> [https://www.w3.org/TR/webgpu/#limits](https://www.w3.org/TR/webgpu/#limits)

---

<div class="post-metadata">

**Author:** ![j4n\_bur53](https://discourse.prolog-lang.org/user_avatar/discourse.prolog-lang.org/j4n_bur53/32/62_2.png) [@j4n\_bur53](https://discourse.prolog-lang.org/u/j4n_bur53)\
**Post date:** [November 3, 2026, 12:30am UTC](https://discourse.prolog-lang.org/t/food-for-thought-are-there-iso-prolog-dialects/205/3 "2026-11-03T00:30:25Z")

</div>

Hi,

What would be a dialect or subset that gets one out  
of the below dilemma of green cuts?

Using the EyeProlog example code, I get this result in a ISO  
compliant Prolog processor. The predicate turns out to be  
non-deterministic operational:

```auto
?- normal_form(append(append(append(a,b),c),d), X).
X = append(a, append(b, append(c, d))) ;
X = append(a, append(b, append(c, d))) ;
false.

```

So normal form has spurious choice points. And would  
explode in practice, when deployed as a normal form  
routine and when supplied larger terms.

A fix would be:

```auto
normal_form(Term, Term) :- 
     \+ rewrite_once(Term, _, _).
normal_form(Term, Normal) :- 
     once(rewrite_once(Term, Next, _)), 
     normal_form(Next, Normal).

```

But once/1 is not among your list of the EyeProlog “by”  
justifications? Lean 4 does solve this problem in that already  
match/with is deterministic. But Lean 4 can make it

declarative by a recursor / motive translation.

Bye

---

<div class="post-metadata">

**Author:** ![j4n\_bur53](https://discourse.prolog-lang.org/user_avatar/discourse.prolog-lang.org/j4n_bur53/32/62_2.png) [@j4n\_bur53](https://discourse.prolog-lang.org/u/j4n_bur53)\
**Post date:** [November 3, 2026, 2:53pm UTC](https://discourse.prolog-lang.org/t/food-for-thought-are-there-iso-prolog-dialects/205/4 "2026-11-03T14:53:22Z")

</div>

Hi,

Well the interesting part of the normal\_form/2 predicate,  
is also that negation as failure is not called with a ground  
goal argument, so the example leans out of the framework

of SLDNF, where \+ G are supposed to have G ground  
at runtime. If it were ground, as a next step in some Datalog  
frameworks it can then indeed be interpreted as absence of

a fact or derived fact, due to negation stratification. But  
Robert Stärk already observed that the two extra variables \_  
and \_, in the call, make it basically asking a not exists query,

and therefore the justifiation is not only absence but  
rather the proof tree of a finite failure. But if we look at  
the example it is also not stead fast, an input 2nd argument

my divert the derivation, and last but not least rewrite\_once  
is left recursive, and has an infinite answer set, i.e. all  
normal terms. One might wonder whether Robert Stärk

left academia back then, because such a large number of  
problems is just too much for a Human. Just joking. The  
resilient Prologer might also see it as the birth place of cuts, since

an alternative formulation often found in the wild would be:

```auto
normal_form(Term, Normal) :- 
   rewrite_once(Term, Next, _), !, 
   normal_form(Next, Normal).
normal_form(Term, Term).

```

Its even steadfast now in the 2nd argument, and calls  
rewrite\_once/3 not in two different places, but only in one  
place, giving yet anoter inch more performance.

Bye

P.S.: Where would steadfastness be needed? Well in this  
definition, the second normal\_form/2 call is with  
mode (+,+), and not anymore with mode (+,-):

```auto
joined_pair(Name) :-
   critical_pair(Name, Left, Right),
   normal_form(Left, Normal),
   normal_form(Right, Normal). 

```
