Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"If it ain't broke, don't fix it." -- Bert Lantz


devel / comp.lang.c / Re: Does this criteria prove that Y calls X in infinite recursion?

SubjectAuthor
* Does this criteria prove that Y calls X in infinite recursion?olcott
+- Re: Does this criteria prove that Y calls X in infinite recursion?Richard Damon
`- Re: Does this criteria prove that Y calls X in infinite recursion?wij

1
Does this criteria prove that Y calls X in infinite recursion?

<upo7m0$3mg1t$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32498&group=comp.lang.c#32498

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: polco...@gmail.com (olcott)
Newsgroups: comp.lang.c
Subject: Does this criteria prove that Y calls X in infinite recursion?
Date: Sun, 4 Feb 2024 08:41:04 -0600
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <upo7m0$3mg1t$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 4 Feb 2024 14:41:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c7f510f1edfb03fa1f8afad5b517831f";
logging-data="3883069"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19HTA/q02zbA5AJw3Ibgmth"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:PniYl0SNqpMbBd87x9+Tq4i4CIc=
Content-Language: en-US
 by: olcott - Sun, 4 Feb 2024 14:41 UTC

The purpose of this question is to determine the minimum correct halt
status criteria required to detect infinite recursion, when we assume
that the functions involved are pure functions (thus computable
functions).

#include <stdint.h>
typedef void(*ptr)();

void X(ptr P, ptr I)
{ P(I);
}

void Y(ptr P)
{ X(P, P);
}

int main()
{ X(Y, Y);
}

Does that fact that Y calls its caller with the same parameters as its
caller prove that Y is calling X in infinite recursion?

*When we assume that Y is a pure function*
If there were any conditional branch instructions in Y prior to its call
to X it seems to be proved that they didn't make any difference.

In computer programming, a pure function is a function that has the
following properties:

(1) the function return values are identical for identical arguments (no
variation with local static variables, non-local variables, mutable
reference arguments or input streams), and

(2) the function has no side effects (no mutation of local static
variables, non-local variables, mutable reference arguments or
input/output streams). https://en.wikipedia.org/wiki/Pure_function

*Computable functions* are the basic objects of study in computability
theory. Computable functions are the formalized analogue of the
intuitive notion of algorithms, in the sense that a function is
computable if there exists an algorithm that can do the job of the
function, i.e. given an input of the function domain it can return the
corresponding output. https://en.wikipedia.org/wiki/Computable_function#

--
Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius
hits a target no one else can see." Arthur Schopenhauer

Re: Does this criteria prove that Y calls X in infinite recursion?

<upoqvq$1j7kv$3@i2pn2.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32516&group=comp.lang.c#32516

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!.POSTED!not-for-mail
From: rich...@damon-family.org (Richard Damon)
Newsgroups: comp.lang.c
Subject: Re: Does this criteria prove that Y calls X in infinite recursion?
Date: Sun, 4 Feb 2024 15:10:34 -0500
Organization: i2pn2 (i2pn.org)
Message-ID: <upoqvq$1j7kv$3@i2pn2.org>
References: <upo7m0$3mg1t$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 4 Feb 2024 20:10:34 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="1679007"; mail-complaints-to="usenet@i2pn2.org";
posting-account="diqKR1lalukngNWEqoq9/uFtbkm5U+w3w6FQ0yesrXg";
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <upo7m0$3mg1t$1@dont-email.me>
X-Spam-Checker-Version: SpamAssassin 4.0.0
 by: Richard Damon - Sun, 4 Feb 2024 20:10 UTC

On 2/4/24 9:41 AM, olcott wrote:
> The purpose of this question is to determine the minimum correct halt
> status criteria required to detect infinite recursion, when we assume
> that the functions involved are pure functions (thus computable
> functions).
>
> #include <stdint.h>
> typedef void(*ptr)();
>
> void X(ptr P, ptr I)
> {
>   P(I);
> }
>
> void Y(ptr P)
> {
>   X(P, P);
> }
>
> int main()
> {
>   X(Y, Y);
> }
>
> Does that fact that Y calls its caller with the same parameters as its
> caller prove that Y is calling X in infinite recursion?
>
> *When we assume that Y is a pure function*
> If there were any conditional branch instructions in Y prior to its call
> to X it seems to be proved that they didn't make any difference.
>
> In computer programming, a pure function is a function that has the
> following properties:
>
> (1) the function return values are identical for identical arguments (no
> variation with local static variables, non-local variables, mutable
> reference arguments or input streams), and
>
> (2) the function has no side effects (no mutation of local static
> variables, non-local variables, mutable reference arguments or
> input/output streams). https://en.wikipedia.org/wiki/Pure_function
>
> *Computable functions* are the basic objects of study in computability
> theory. Computable functions are the formalized analogue of the
> intuitive notion of algorithms, in the sense that a function is
> computable if there exists an algorithm that can do the job of the
> function, i.e. given an input of the function domain it can return the
> corresponding output. https://en.wikipedia.org/wiki/Computable_function#
>

As you have been told elsewhere, to prove you have infinite recursion,
not only must there be no conditionals in Y, there needs to be no
conditionals in X.

Also, when you later change X into a conditional simulator, that is a
very different thing then an unconditional call to the parameters
defined by its input. (as is clear you are going to want to do)

So, you are going down a dead end.

Re: Does this criteria prove that Y calls X in infinite recursion?

<7195ba8f5600a5e476287511e66b9b1467863362.camel@gmail.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=32541&group=comp.lang.c#32541

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wynii...@gmail.com (wij)
Newsgroups: comp.lang.c
Subject: Re: Does this criteria prove that Y calls X in infinite recursion?
Date: Mon, 05 Feb 2024 09:40:09 +0800
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <7195ba8f5600a5e476287511e66b9b1467863362.camel@gmail.com>
References: <upo7m0$3mg1t$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: dont-email.me; posting-host="5775d48718591fcd05ed048e576f62c1";
logging-data="4156249"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cJn9/vCJIpBBTQKfv51Xb"
User-Agent: Evolution 3.50.2 (3.50.2-1.fc39)
Cancel-Lock: sha1:5rc+nNE/XaGmUiva3p7Y8gAlb5s=
In-Reply-To: <upo7m0$3mg1t$1@dont-email.me>
 by: wij - Mon, 5 Feb 2024 01:40 UTC

On Sun, 2024-02-04 at 08:41 -0600, olcott wrote:
> The purpose of this question is to determine the minimum correct halt
> status criteria required to detect infinite recursion, when we assume
> that the functions involved are pure functions (thus computable
> functions).
>
> #include <stdint.h>
> typedef void(*ptr)();
>
> void X(ptr P, ptr I)
> {
>    P(I);
> }
>
> void Y(ptr P)
> {
>    X(P, P);
> }
>
> int main()
> {
>    X(Y, Y);
> }
>

Almost gibberish. Does it compile?

> Does that fact that Y calls its caller with the same parameters as
> its
> caller prove that Y is calling X in infinite recursion?
>
> *When we assume that Y is a pure function*
> If there were any conditional branch instructions in Y prior to its
> call
> to X it seems to be proved that they didn't make any difference.
>
> In computer programming, a pure function is a function that has the
> following properties:
>
> (1) the function return values are identical for identical arguments
> (no
> variation with local static variables, non-local variables, mutable
> reference arguments or input streams), and
>
> (2) the function has no side effects (no mutation of local static
> variables, non-local variables, mutable reference arguments or
> input/output streams). https://en.wikipedia.org/wiki/Pure_function
>
> *Computable functions* are the basic objects of study in
> computability
> theory. Computable functions are the formalized analogue of the
> intuitive notion of algorithms, in the sense that a function is
> computable if there exists an algorithm that can do the job of the
> function, i.e. given an input of the function domain it can return
> the
> corresponding output.
> https://en.wikipedia.org/wiki/Computable_function#
>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor