bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] A few problems


From: vvs
Subject: Re: [Bug-apl] A few problems
Date: Sun, 3 Feb 2019 20:14:51 +0200

On Sun, Feb 3, 2019 at 12:49 PM Dr. Jürgen Sauermann
<address@hidden> wrote:
> thanks, hopefully fixed in SVN 1122. The gcc guys create new
> warnings faster than I can fix them.

Thanks. It's compiled now without problems.

> Regarding the other problem:
>
>       ∇A
> [1]  A←0
>
>
> when the Symbol A is resolved it immediately causes the
> execution of A (iff A is a niladic function). That happens before
> the assignment can take place. The consequence is an infinite
> recursion of A (which can, BTW, be limited with ⎕SYL[1;2]).

That explains it, of course. But isn't it a dangerous behavior?
Consider this example:

∇A
[1] B←0
∇

∇B
[1] A←0
∇

A←1

This can easily happen if you copy functions from different
workplaces, especially not yours and where functions are much more
complex than in this artificial case. Certainly, it could be
restricted by ulimit (or ⎕SYL[1;2]), but this is only a palliative and
usually is common for servers, not for desktops used by developers.
Also, it still could lead to interpreter crash and possible loss of
data.

How other APL implementations deal with it? Isn't it specified by ISO
standard? I'd look at how Dyalog works in this case, but their Linux
version requires 64-bit OS which I'd like to avoid for several reasons
(one of them is that x86_64 doesn't have segments which are used on
IA32 architecture to validate fine-grained pointer access).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]