Re: transpiling to low level C

Liste des GroupesRevenir à cl c 
Sujet : Re: transpiling to low level C
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.c
Date : 13. Jan 2025, 17:10:31
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86tta266fc.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:

On 21.12.2024 22:51, Tim Rentsch wrote:
>
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>
On 21.12.2024 02:28, Tim Rentsch wrote:
>
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>
On 16.12.2024 00:53, BGB wrote:
>
[...]
>
Pretty much all higher level control flow can be expressed via
goto.
>
A 'goto' may be used but it isn't strictly *necessary*. What
*is* necessary, though, that is an 'if' (some conditional
branch), and either 'goto' or recursive functions.
>
Conditional branches, including 'if', '?:', etc., are not
strictly necessary either.
>
No? - Can you give an example of your statement?
>
(Unless you just wanted to say that in some HLL abstraction like
'printf("Hello world!\n")' there's no [visible] conditional
branch.  Likewise in a 'ClearAccumulator' machine instruction, or
the like.)
>
The comparisons and predicates are one key function (not any
specific branch construct, whether on HLL level, assembler
level, or with the (elementary but most powerful) Turing
Machine).  Comparisons inherently result in predicates which is
what controls program execution).
>
So your statement asks for some explanation at least.
>
Start with C - any of C90, C99, C11.
>
Take away the short-circuiting operators - &&, ||, ?:.
>
Take away all statement types that involve intra-function
transfer of control:  goto, break, continue, if, for, while,
switch, do/while.  Might as well take away statement labels too.
>
Take away setjmp and longjmp.
>
And also things like the above mentioned 'printf()' that most
certainly implies an iteration over the format string checking for
it's '\0'-end.

The *printf() functions can be implemented in standard C, under the
above stated limitations, without needing iteration.

And so on, and so on. - What will be left as "language".

I think most C developers would be able to answer that question
given the above stated description.  Is there some part that isn't
clear to you?

Would you be able to formulate functionality of the class of
Recursive Functions (languages class of a Turing Machine with
Chomsky-0 grammar).

General rewrite grammars, which is another name IIRC for Chomsky
Type 0 languages, are computationally equivalent to Turing Machines
(which incidentally takes me back almost five decades to my formal
computability education).  The answer is yes.


Rule out programs with undefined behavior.
>
The language that is left is still Turing complete.
>
Is it?

Yes, it is.

But wouldn't that be just the argument I mentioned above;  that a,
say, 'ClearAccumulator' machine statement wouldn't contain any
jump?

No, afaict the two questions have nothing to do with each other.


Proof: exercise for the reader.
>
(Typical sort of your reply.)

I expect you will see better results if you put more effort into
listening and thinking, and less effort into making ad hominem
remarks.

Date Sujet#  Auteur
15 Dec 24 * transpiling to low level C138Thiago Adams
15 Dec 24 +* Re: transpiling to low level C10Lawrence D'Oliveiro
15 Dec 24 i`* Re: transpiling to low level C9Thiago Adams
15 Dec 24 i `* Re: transpiling to low level C8Lawrence D'Oliveiro
16 Dec 24 i  `* Re: transpiling to low level C7Thiago Adams
16 Dec 24 i   `* Re: transpiling to low level C6BGB
16 Dec 24 i    +- Re: transpiling to low level C1Thiago Adams
16 Dec 24 i    +- Re: transpiling to low level C1bart
16 Dec 24 i    +- Re: transpiling to low level C1Lawrence D'Oliveiro
16 Dec 24 i    `* Re: transpiling to low level C2Keith Thompson
17 Dec 24 i     `- Re: transpiling to low level C1bart
15 Dec 24 +* Re: transpiling to low level C5Chris M. Thomasson
15 Dec 24 i`* Re: transpiling to low level C4Thiago Adams
15 Dec 24 i `* Re: transpiling to low level C3Chris M. Thomasson
16 Feb 25 i  `* Re: transpiling to low level C2Chris M. Thomasson
16 Feb 25 i   `- USENET and spam (Was: Re: transpiling to low level C)1Salvador Mirzo
15 Dec 24 +* Re: transpiling to low level C3bart
15 Dec 24 i`* Re: transpiling to low level C2Thiago Adams
15 Dec 24 i `- Re: transpiling to low level C1Thiago Adams
15 Dec 24 +* Re: transpiling to low level C117Bonita Montero
15 Dec 24 i+* Re: transpiling to low level C114bart
16 Dec 24 ii`* Re: transpiling to low level C113BGB
16 Dec 24 ii +- Re: transpiling to low level C1David Brown
16 Dec 24 ii +* Re: transpiling to low level C22Thiago Adams
17 Dec 24 ii i`* Re: transpiling to low level C21BGB
17 Dec 24 ii i `* Re: transpiling to low level C20Thiago Adams
17 Dec 24 ii i  +* Re: transpiling to low level C15Thiago Adams
17 Dec 24 ii i  i`* Re: transpiling to low level C14Thiago Adams
17 Dec 24 ii i  i `* Re: transpiling to low level C13bart
17 Dec 24 ii i  i  `* Re: transpiling to low level C12Thiago Adams
17 Dec 24 ii i  i   `* Re: transpiling to low level C11bart
18 Dec 24 ii i  i    `* Re: transpiling to low level C10BGB
18 Dec 24 ii i  i     `* Re: transpiling to low level C9Thiago Adams
19 Dec 24 ii i  i      `* Re: transpiling to low level C8BGB
19 Dec 24 ii i  i       `* Re: transpiling to low level C7bart
19 Dec 24 ii i  i        `* Re: transpiling to low level C6BGB
19 Dec 24 ii i  i         +* Re: transpiling to low level C3bart
19 Dec 24 ii i  i         i`* Re: transpiling to low level C2BGB
20 Dec 24 ii i  i         i `- Re: transpiling to low level C1BGB
23 Dec 24 ii i  i         `* Re: transpiling to low level C2Lawrence D'Oliveiro
23 Dec 24 ii i  i          `- Re: transpiling to low level C1BGB
17 Dec 24 ii i  `* Re: transpiling to low level C4BGB
17 Dec 24 ii i   +* Re: transpiling to low level C2Thiago Adams
18 Dec 24 ii i   i`- Re: transpiling to low level C1BGB
21 Dec 24 ii i   `- Re: transpiling to low level C1Lawrence D'Oliveiro
16 Dec 24 ii +* Re: transpiling to low level C76Janis Papanagnou
16 Dec 24 ii i+* Re: transpiling to low level C16bart
16 Dec 24 ii ii`* Re: transpiling to low level C15Janis Papanagnou
17 Dec 24 ii ii `* Re: transpiling to low level C14bart
17 Dec 24 ii ii  +* Re: transpiling to low level C12Keith Thompson
17 Dec 24 ii ii  i+- Re: transpiling to low level C1BGB
17 Dec 24 ii ii  i`* Re: transpiling to low level C10bart
17 Dec 24 ii ii  i +- Re: transpiling to low level C1Janis Papanagnou
17 Dec 24 ii ii  i +* Re: transpiling to low level C6Waldek Hebisch
17 Dec 24 ii ii  i i+* Re: transpiling to low level C4bart
18 Dec 24 ii ii  i ii`* Re: transpiling to low level C3Waldek Hebisch
18 Dec 24 ii ii  i ii `* Re: transpiling to low level C2bart
18 Dec 24 ii ii  i ii  `- Re: transpiling to low level C1Waldek Hebisch
18 Dec 24 ii ii  i i`- Re: transpiling to low level C1Janis Papanagnou
17 Dec 24 ii ii  i `* Re: transpiling to low level C2Keith Thompson
18 Dec 24 ii ii  i  `- Re: transpiling to low level C1Janis Papanagnou
17 Dec 24 ii ii  `- Re: transpiling to low level C1Janis Papanagnou
21 Dec 24 ii i`* Re: transpiling to low level C59Tim Rentsch
21 Dec 24 ii i `* Re: transpiling to low level C58Janis Papanagnou
21 Dec 24 ii i  +* Re: transpiling to low level C3Tim Rentsch
22 Dec 24 ii i  i`* Re: transpiling to low level C2Janis Papanagnou
13 Jan 25 ii i  i `- Re: transpiling to low level C1Tim Rentsch
21 Dec 24 ii i  +* Re: transpiling to low level C21Michael S
22 Dec 24 ii i  i+* Re: transpiling to low level C17Janis Papanagnou
22 Dec 24 ii i  ii`* Re: transpiling to low level C16Michael S
22 Dec 24 ii i  ii `* Re: transpiling to low level C15Janis Papanagnou
22 Dec 24 ii i  ii  `* Re: transpiling to low level C14Michael S
22 Dec 24 ii i  ii   +* Re: transpiling to low level C11Janis Papanagnou
23 Dec 24 ii i  ii   i`* Re: transpiling to low level C10Tim Rentsch
23 Dec 24 ii i  ii   i `* Re: transpiling to low level C9Waldek Hebisch
23 Dec 24 ii i  ii   i  +* Re: transpiling to low level C3David Brown
25 Dec 24 ii i  ii   i  i`* Re: transpiling to low level C2BGB
28 Dec 24 ii i  ii   i  i `- Re: transpiling to low level C1Tim Rentsch
4 Jan 25 ii i  ii   i  `* Re: transpiling to low level C5Tim Rentsch
4 Jan 25 ii i  ii   i   +- Re: transpiling to low level C1Chris M. Thomasson
5 Jan 25 ii i  ii   i   `* Re: transpiling to low level C3Ben Bacarisse
5 Jan 25 ii i  ii   i    +- Re: transpiling to low level C1James Kuyper
8 Jan 25 ii i  ii   i    `- Re: transpiling to low level C1Tim Rentsch
22 Dec 24 ii i  ii   `* Re: transpiling to low level C2James Kuyper
22 Dec 24 ii i  ii    `- Re: transpiling to low level C1Janis Papanagnou
23 Dec 24 ii i  i`* Re: transpiling to low level C3Tim Rentsch
23 Dec 24 ii i  i `* Re: transpiling to low level C2Chris M. Thomasson
24 Dec 24 ii i  i  `- Re: transpiling to low level C1Chris M. Thomasson
22 Dec 24 ii i  +* Re: transpiling to low level C27Waldek Hebisch
22 Dec 24 ii i  i+* Re: transpiling to low level C2Michael S
22 Dec 24 ii i  ii`- Re: transpiling to low level C1bart
22 Dec 24 ii i  i+* Re: transpiling to low level C3Tim Rentsch
22 Dec 24 ii i  ii`* Re: transpiling to low level C2Waldek Hebisch
4 Jan 25 ii i  ii `- Re: transpiling to low level C1Tim Rentsch
22 Dec 24 ii i  i`* Re: transpiling to low level C21Janis Papanagnou
22 Dec 24 ii i  i +* Re: transpiling to low level C4Michael S
23 Dec 24 ii i  i i+- Re: transpiling to low level C1bart
23 Dec 24 ii i  i i+- Re: transpiling to low level C1Michael S
23 Dec 24 ii i  i i`- Re: transpiling to low level C1Tim Rentsch
23 Dec 24 ii i  i +- Re: transpiling to low level C1Waldek Hebisch
23 Dec 24 ii i  i +* Re: transpiling to low level C14David Brown
23 Dec 24 ii i  i `- Re: transpiling to low level C1Tim Rentsch
22 Dec 24 ii i  +* Re: transpiling to low level C2Ben Bacarisse
22 Dec 24 ii i  `* Re: transpiling to low level C4Kaz Kylheku
16 Dec 24 ii `* Re: transpiling to low level C13Lawrence D'Oliveiro
16 Dec 24 i`* Re: transpiling to low level C2Lawrence D'Oliveiro
9 Feb 25 `* Re: transpiling to low level C2User One

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal