Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #384618 > unrolled thread
| Started by | olcott <polcott333@gmail.com> |
|---|---|
| First post | 2024-05-18 16:40 -0500 |
| Last post | 2024-05-20 10:13 -0500 |
| Articles | 17 on this page of 137 — 18 participants |
Back to article view | Back to comp.lang.c
Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-18 16:40 -0500
Re: Can someone please verify the execution trace of this? Richard Damon <richard@damon-family.org> - 2024-05-18 18:33 -0400
Re: Can someone please verify the execution trace of this? Sam <sam@email-scan.com> - 2024-05-18 21:12 -0400
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-18 22:16 -0500
Re: Can someone please verify the execution trace of this? jak <nospam@please.ty> - 2024-05-19 06:24 +0200
Re: Can someone please verify the execution trace of this? Rosario19 <Ros@invalid.invalid> - 2024-05-19 06:25 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-18 23:58 -0500
Re: Can someone please verify the execution trace of this? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-19 20:08 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-19 14:00 -0500
Re: Can someone please verify the execution trace of this? Richard Damon <richard@damon-family.org> - 2024-05-19 15:24 -0400
Re: Can someone please verify the execution trace of this? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-20 03:52 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-19 21:43 -0500
Re: Can someone please verify the execution trace of this? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-20 07:09 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 00:38 -0500
Re: Can someone please verify the execution trace of this? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-20 08:41 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 09:47 -0500
Re: Can someone please verify the execution trace of this? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-20 17:16 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 11:01 -0500
Re: Can someone please verify the execution trace of this? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-20 19:15 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 12:20 -0500
Re: Can someone please verify the execution trace of this? Richard Harnden <richard.nospam@gmail.invalid> - 2024-05-20 19:26 +0100
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 14:09 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 11:35 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 14:15 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:23 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 14:28 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:30 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 14:34 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:35 -0700
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:36 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 14:38 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:42 -0700
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:38 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 14:40 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:44 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 14:48 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:50 -0700
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:52 -0700
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:32 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 14:37 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:41 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 14:45 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 12:47 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 14:53 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 13:04 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 15:10 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 13:19 -0700
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 13:21 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 15:30 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 13:31 -0700
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 13:32 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 15:36 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 13:38 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 15:52 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 14:05 -0700
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 14:09 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 16:27 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 13:48 -0700
Re: Can someone please verify the execution trace of this? "Fred. Zwarts" <F.Zwarts@HetNet.nl> - 2024-05-20 10:10 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 09:51 -0500
Re: Can someone please verify the execution trace of this? Paavo Helde <eesnimi@osa.pri.ee> - 2024-05-20 18:05 +0300
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 10:11 -0500
Re: Can someone please verify the execution trace of this? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-20 17:17 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 11:07 -0500
Re: Can someone please verify the execution trace of this? "Fred. Zwarts" <F.Zwarts@HetNet.nl> - 2024-05-21 00:14 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 17:23 -0500
Re: Can someone please verify the execution trace of this? Sam <sam@email-scan.com> - 2024-05-20 18:59 -0400
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 18:07 -0500
Re: Can someone please verify the execution trace of this? Sam <sam@email-scan.com> - 2024-05-20 19:21 -0400
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 18:27 -0500
Re: Can someone please verify the execution trace of this? Sam <sam@email-scan.com> - 2024-05-21 07:48 -0400
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-21 08:37 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-21 12:03 -0700
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-21 14:21 -0500
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-21 14:39 -0700
Re: Can someone please verify the execution trace of this? Sam <sam@email-scan.com> - 2024-05-21 17:55 -0400
Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 17:09 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-21 15:18 -0700
Re: Can D correctly simulated by H reach its own line 06 and halt? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-21 15:20 -0700
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 17:29 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-21 15:34 -0700
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 18:07 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-21 16:54 -0700
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 19:05 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? Sam <sam@email-scan.com> - 2024-05-21 21:31 -0400
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 20:43 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? Sam <sam@email-scan.com> - 2024-05-21 22:10 -0400
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 21:17 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? Sam <sam@email-scan.com> - 2024-05-21 22:20 -0400
Re: Can D correctly simulated by H reach its own line 06 and halt? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-05-21 21:23 -0700
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 21:22 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 23:03 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? tTh <tth@none.invalid> - 2024-05-22 06:45 +0200
Re: Can D correctly simulated by H reach its own line 06 and halt? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-22 13:47 -0700
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-22 08:53 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? Sam <sam@email-scan.com> - 2024-05-22 13:10 -0400
Re: Can D correctly simulated by H reach its own line 06 and halt? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-22 13:50 -0700
Re: Can D correctly simulated by H reach its own line 06 and halt? Sam <sam@email-scan.com> - 2024-05-22 07:01 -0400
Re: Can D correctly simulated by H reach its own line 06 and halt? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-22 13:50 +0200
Re: Can someone please verify the execution trace of this? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-20 21:00 -0700
Can D simulated by any H possibly reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-20 23:22 -0500
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 22:58 -0500
Re: Can someone please verify the execution trace of this? "Fred. Zwarts" <F.Zwarts@HetNet.nl> - 2024-05-21 09:39 +0200
Re: Can someone please verify the execution trace of this? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-05-21 09:55 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-21 08:31 -0500
Re: Can someone please verify the execution trace of this? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-21 15:56 +0200
Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 09:09 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-21 20:01 +0200
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 13:09 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-21 20:13 +0200
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 13:24 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-21 20:39 +0200
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 13:48 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? bart <bc@freeuk.com> - 2024-05-21 22:34 +0100
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 16:56 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? David Brown <david.brown@hesbynett.no> - 2024-05-22 10:54 +0200
D correctly simulated by H remains stuck in recursive simulation olcott <polcott333@gmail.com> - 2024-05-22 10:44 -0500
Re: D correctly simulated by H remains stuck in recursive simulation "Fred. Zwarts" <F.Zwarts@HetNet.nl> - 2024-05-22 18:27 +0200
Re: D correctly simulated by H remains stuck in recursive simulation [good attempt] olcott <polcott333@gmail.com> - 2024-05-22 15:04 -0500
Re: D correctly simulated by H remains stuck in recursive simulation [good attempt] wij <wyniijj5@gmail.com> - 2024-05-23 04:59 +0800
Re: D correctly simulated by H remains stuck in recursive simulation [good attempt] olcott <polcott333@gmail.com> - 2024-05-22 16:26 -0500
Re: D correctly simulated by H remains stuck in recursive simulation olcott <polcott333@gmail.com> - 2024-05-22 16:56 -0500
Re: D correctly simulated by H remains stuck in recursive simulation "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-22 15:36 -0700
Re: D correctly simulated by H remains stuck in recursive simulation olcott <polcott333@gmail.com> - 2024-05-22 17:52 -0500
Re: D correctly simulated by H remains stuck in recursive simulation "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-05-22 18:33 -0700
Re: Can D correctly simulated by H reach its own line 06 and halt? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-22 06:40 +0200
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 23:46 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-22 18:29 +0200
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-22 08:52 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-22 12:01 +0200
Re: Can D correctly simulated by H reach its own line 06 and halt? olcott <polcott333@gmail.com> - 2024-05-21 23:37 -0500
Re: Can D correctly simulated by H reach its own line 06 and halt? Bonita Montero <Bonita.Montero@gmail.com> - 2024-05-22 06:29 +0200
Partial function types Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-05-21 22:15 -0700
Re: Partial function types Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-05-21 23:27 -0700
Re: Can someone please verify the execution trace of this? Marcel Mueller <news.5.maazl@spamgourmet.org> - 2024-05-20 15:14 +0200
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 10:10 -0500
Re: Can someone please verify the execution trace of this? olcott <polcott333@gmail.com> - 2024-05-20 10:13 -0500
Page 7 of 7 — ← Prev page 1 2 3 4 5 6 [7]
| From | olcott <polcott333@gmail.com> |
|---|---|
| Date | 2024-05-22 16:26 -0500 |
| Subject | Re: D correctly simulated by H remains stuck in recursive simulation [good attempt] |
| Message-ID | <v2lntg$1c0ls$2@dont-email.me> |
| In reply to | #384836 |
On 5/22/2024 3:59 PM, wij wrote:
> On Wed, 2024-05-22 at 15:04 -0500, olcott wrote:
>> On 5/22/2024 11:11 AM, wij wrote:
>>> On Wed, 2024-05-22 at 10:44 -0500, olcott wrote:
>>>> On 5/22/2024 3:54 AM, David Brown wrote:
>>>>> On 21/05/2024 23:56, olcott wrote:
>>>>>> On 5/21/2024 4:34 PM, bart wrote:
>>>>>>> On 21/05/2024 19:48, olcott wrote:
>>>>>>>> On 5/21/2024 1:39 PM, Bonita Montero wrote:
>>>>>>>
>>>>>>>>> You're neither asking about a C- or C++ problem.
>>>>>>>>> So use a proper newsgroup.
>>>>>>>>>
>>>>>>>>
>>>>>>>> There is no other group that knows enough about the semantics of the
>>>>>>>> C programming language and there is no other group still alive that
>>>>>>>> knows enough about the semantics of programming languages.
>>>>>>>
>>>>>>> Then FFS take it to Reddit, where there are a myriad thriving forums,
>>>>>>> rather than a dying usenet group populated by a few aging regulars.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> I have taken it to many different forums.
>>>>>> This is one of two forums where someone actually answered the question.
>>>>>> Two years ago someone answered the assembly language version of the
>>>>>> question. I think the Reddit banned me for even asking the question.
>>>>>>
>>>>>
>>>>> The /only/ reason you are not banned here is because unmoderated Usenet
>>>>> groups cannot ban people.
>>>>>
>>>>> You post obsessively in many places, and face nothing but rejection,
>>>>> ridicule, and banning. Has it ever occurred to you to look for the
>>>>> common factor here? It is /you/, and the posts you make. If you truly
>>>>> want to make progress on your bizarre ideas, you are going to have to
>>>>> re-think your strategy - it is entirely obvious to everyone that you
>>>>> will not get the answers you are asking for here or anywhere else with
>>>>> your current posting style.
>>>>>
>>>>>
>>>>
>>>> *On the other hand people could simply answer my question*
>>>> *I only repeat it until it is answered*
>>>>
>>>> For every H/D pair matching the following template where
>>>> H is a pure function:
>>>>
>>>> Does any D correctly simulated by H reach its own line 06 and
>>>> halt or does the fact that D remains stuck in recursive simulation
>>>> prevent that?
>>>>
>>>> typedef int (*ptr)(); // ptr is pointer to int function in C
>>>> 00 int H(ptr p, ptr i);
>>>> 01 int D(ptr p)
>>>> 02 {
>>>> 03 int Halt_Status = H(p, p);
>>>> 04 if (Halt_Status)
>>>> 05 HERE: goto HERE;
>>>> 06 return Halt_Status;
>>>> 07 }
>>>> 08
>>>> 09 int main()
>>>> 10 {
>>>> 11 H(D,D);
>>>> 12 return 0;
>>>> 13 }
>>>>
>>>> It is trivial to see that for every H/D pair of the infinite
>>>> set of H/D pairs that match the above template that
>>>>
>>>> D correctly simulated by H cannot possibly reach its own final
>>>> state at line 06 and halt because D correctly simulated by
>>>> H remains stuck in recursive simulation.
>>>>
>>>> This provides the basis for simulating termination analyzer H to
>>>> correctly determine that the halting problem's counter-example
>>>> input D cannot possibly halt.
>>>>
>>>
>>> If H is truly a simulator, its function is expected to be equivalent to:
>>>
>>> int H(ptr x, ptr y) {
>>> x(y);
>>> return __WHATEVER;
>>> }
>>>
>>> The H(D,D) can never halt.
>>>
>>>
>>
>> Finally someone took 30 seconds to answer, thanks!
>> *The actual question was slightly different in a very crucial way*
>>
>> It is trivial to see that for every H/D pair of the infinite
>> set of H/D pairs that match the above template that
>>
>> D correctly simulated by H cannot possibly reach its own final
>> state at line 06 and halt because D correctly simulated by
>> H remains stuck in recursive simulation.
>
> Correct. H will be stuck in the recursive simulations.
>
>> *In other words even when H(D,D) terminates normally D*
>> *correctly simulated by H cannot possibly terminate normally*
>
> Correct. Because D is programmed to behave the opposite of what the
> called H inside H reported.
No that is not true. D never gets to the point where it can possibly
do the opposite of whatever H reports.
*D correctly simulated by H cannot possibly reach past its own line 03*
Thanks for your help.
--
Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius
hits a target no one else can see." Arthur Schopenhauer
[toc] | [prev] | [next] | [standalone]
| From | olcott <polcott333@gmail.com> |
|---|---|
| Date | 2024-05-22 16:56 -0500 |
| Subject | Re: D correctly simulated by H remains stuck in recursive simulation |
| Message-ID | <v2lplu$1c9b0$1@dont-email.me> |
| In reply to | #384811 |
On 5/22/2024 11:11 AM, wij wrote:
> On Wed, 2024-05-22 at 10:44 -0500, olcott wrote:
>> On 5/22/2024 3:54 AM, David Brown wrote:
>>> On 21/05/2024 23:56, olcott wrote:
>>>> On 5/21/2024 4:34 PM, bart wrote:
>>>>> On 21/05/2024 19:48, olcott wrote:
>>>>>> On 5/21/2024 1:39 PM, Bonita Montero wrote:
>>>>>
>>>>>>> You're neither asking about a C- or C++ problem.
>>>>>>> So use a proper newsgroup.
>>>>>>>
>>>>>>
>>>>>> There is no other group that knows enough about the semantics of the
>>>>>> C programming language and there is no other group still alive that
>>>>>> knows enough about the semantics of programming languages.
>>>>>
>>>>> Then FFS take it to Reddit, where there are a myriad thriving forums,
>>>>> rather than a dying usenet group populated by a few aging regulars.
>>>>>
>>>>>
>>>>
>>>> I have taken it to many different forums.
>>>> This is one of two forums where someone actually answered the question.
>>>> Two years ago someone answered the assembly language version of the
>>>> question. I think the Reddit banned me for even asking the question.
>>>>
>>>
>>> The /only/ reason you are not banned here is because unmoderated Usenet
>>> groups cannot ban people.
>>>
>>> You post obsessively in many places, and face nothing but rejection,
>>> ridicule, and banning. Has it ever occurred to you to look for the
>>> common factor here? It is /you/, and the posts you make. If you truly
>>> want to make progress on your bizarre ideas, you are going to have to
>>> re-think your strategy - it is entirely obvious to everyone that you
>>> will not get the answers you are asking for here or anywhere else with
>>> your current posting style.
>>>
>>>
>>
>> *On the other hand people could simply answer my question*
>> *I only repeat it until it is answered*
>>
>> For every H/D pair matching the following template where
>> H is a pure function:
>>
>> Does any D correctly simulated by H reach its own line 06 and
>> halt or does the fact that D remains stuck in recursive simulation
>> prevent that?
>>
>> typedef int (*ptr)(); // ptr is pointer to int function in C
>> 00 int H(ptr p, ptr i);
>> 01 int D(ptr p)
>> 02 {
>> 03 int Halt_Status = H(p, p);
>> 04 if (Halt_Status)
>> 05 HERE: goto HERE;
>> 06 return Halt_Status;
>> 07 }
>> 08
>> 09 int main()
>> 10 {
>> 11 H(D,D);
>> 12 return 0;
>> 13 }
>>
>> It is trivial to see that for every H/D pair of the infinite
>> set of H/D pairs that match the above template that
>>
>> D correctly simulated by H cannot possibly reach its own final
>> state at line 06 and halt because D correctly simulated by
>> H remains stuck in recursive simulation.
>>
>> This provides the basis for simulating termination analyzer H to
>> correctly determine that the halting problem's counter-example
>> input D cannot possibly halt.
>>
>
> If H is truly a simulator, its function is expected to be equivalent to:
>
> int H(ptr x, ptr y) {
> x(y);
> return __WHATEVER;
> }
>
> The H(D,D) can never halt.
>
>
*CORRECT SIMULATION DEFINED*
In the above case a simulator is an x86 emulator that
correctly emulates at least one of the x86 instructions
of D in the order specified by the x86 instructions of D.
This may include correctly emulating the x86 instructions
of H in the order specified by the x86 instructions of H
thus calling H(D,D) in recursive simulation.
After our dialogue:
*I need a nice clean reply that simply agrees with this*
For every H/D pair of the infinite set of H/D pairs that match
the above template:
D correctly simulated by H cannot possibly reach its own final
state at line 06 and halt because D correctly simulated by H
remains stuck in recursive simulation.
*Thanks again for your help*
--
Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius
hits a target no one else can see." Arthur Schopenhauer
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2024-05-22 15:36 -0700 |
| Subject | Re: D correctly simulated by H remains stuck in recursive simulation |
| Message-ID | <v2ls24$1cqnt$1@dont-email.me> |
| In reply to | #384841 |
On 5/22/2024 2:56 PM, olcott wrote: [...] > After our dialogue: > *I need a nice clean reply that simply agrees with this* Humm... Perhaps: https://youtu.be/RxJuIlbT740 Hummm. ;^) [...]
[toc] | [prev] | [next] | [standalone]
| From | olcott <polcott333@gmail.com> |
|---|---|
| Date | 2024-05-22 17:52 -0500 |
| Subject | Re: D correctly simulated by H remains stuck in recursive simulation |
| Message-ID | <v2lsvq$1cvt0$1@dont-email.me> |
| In reply to | #384842 |
On 5/22/2024 5:36 PM, Chris M. Thomasson wrote: > On 5/22/2024 2:56 PM, olcott wrote: > [...] >> After our dialogue: >> *I need a nice clean reply that simply agrees with this* > > Humm... Perhaps: > > https://youtu.be/RxJuIlbT740 *It will end as soon as three people provide a correct reply* -- Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius hits a target no one else can see." Arthur Schopenhauer
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2024-05-22 18:33 -0700 |
| Subject | Re: D correctly simulated by H remains stuck in recursive simulation |
| Message-ID | <v2m6dp$1i3te$1@dont-email.me> |
| In reply to | #384843 |
On 5/22/2024 3:52 PM, olcott wrote: > On 5/22/2024 5:36 PM, Chris M. Thomasson wrote: >> On 5/22/2024 2:56 PM, olcott wrote: >> [...] >>> After our dialogue: >>> *I need a nice clean reply that simply agrees with this* >> >> Humm... Perhaps: >> >> https://youtu.be/RxJuIlbT740 > > *It will end as soon as three people provide a correct reply* Sure. Notice the name of the song I linked you too? The Never ending Story? ;^)
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2024-05-22 06:40 +0200 |
| Subject | Re: Can D correctly simulated by H reach its own line 06 and halt? |
| Message-ID | <v2jt03$118ea$1@raubtier-asyl.eternal-september.org> |
| In reply to | #384756 |
Am 22.05.2024 um 06:37 schrieb olcott:
> On 5/21/2024 11:29 PM, Bonita Montero wrote:
>> Am 21.05.2024 um 20:48 schrieb olcott:
>>> On 5/21/2024 1:39 PM, Bonita Montero wrote:
>>>> Am 21.05.2024 um 20:24 schrieb olcott:
>>>>> On 5/21/2024 1:13 PM, Bonita Montero wrote:
>>>>>> Am 21.05.2024 um 20:09 schrieb olcott:
>>>>>>> On 5/21/2024 1:01 PM, Bonita Montero wrote:
>>>>>>>> Am 21.05.2024 um 16:09 schrieb olcott:
>>>>>>>>
>>>>>>>>> I am only asking the c experts here whether or not D correctly
>>>>>>>>> simulated by *pure function* H can possibly reach its own line
>>>>>>>>> 06 and halt for every H/D pair matching the template provided.
>>>>>>>>
>>>>>>>> Saying this is a question about C is like questioning something
>>>>>>>> about physics in Polish and claiming this is a question about
>>>>>>>> Polish.
>>>>>>>
>>>>>>> I am convinced that the question can be fully answered entirely
>>>>>>> on the
>>>>>>> basis of the semantics of C in the exact same way that the
>>>>>>> termination
>>>>>>> status of the following functions can be answered entirely on the
>>>>>>> basis
>>>>>>> of sufficient knowledge of the semantics of c.
>>>>>>>
>>>>>>> *If you believe otherwise then I ask for you to please justify this*
>>>>>>>
>>>>>>> void Infinite_Recursion()
>>>>>>> {
>>>>>>> Infinite_Recursion();
>>>>>>> }
>>>>>>>
>>>>>>> int factorial(int n) // called with 5
>>>>>>> {
>>>>>>> if (n >= 1)
>>>>>>> return n*factorial(n-1);
>>>>>>> else
>>>>>>> return 1;
>>>>>>> }
>>>>>>>
>>>>>>> void Infinite_Loop()
>>>>>>> {
>>>>>>> HERE: goto HERE;
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> This is possible with most languages so this isn't a question
>>>>>> about C.
>>>>>
>>>>> None-the-less the semantics of my code template does seem
>>>>> to prove the result that I stated. I would not even be here
>>>>> except for the people in the other forum that consistently
>>>>> lie about this.
>>>>>
>>>>
>>>> You're neither asking about a C- or C++ problem.
>>>> So use a proper newsgroup.
>>>>
>>>
>>> There is no other group that knows enough about the semantics of the
>>> C programming language and there is no other group still alive that
>>> knows enough about the semantics of programming languages.
>>>
>>
>> comp.theory is the most apppropriate group.
>>
>
> They have proven to not be the right group because they have
> consistently lied about this for two years.
Maybe, but according to the topic this group fits.
>
> It is trivial to see that for every H/D pair of the infinite
> set of H/D pairs that match the below template that
>
> D correctly simulated by H cannot possibly reach its own final
> state at line 06 and halt because D correctly simulated by
> H remains stuck in recursive simulation.
>
> This provides the basis for simulating termination analyzer H to
> correctly determine that the halting problem's counter-example
> input D cannot possibly halt.
>
> typedef int (*ptr)(); // ptr is pointer to int function in C
> 00 int H(ptr p, ptr i);
> 01 int D(ptr p)
> 02 {
> 03 int Halt_Status = H(p, p);
> 04 if (Halt_Status)
> 05 HERE: goto HERE;
> 06 return Halt_Status;
> 07 }
> 08
> 09 int main()
> 10 {
> 11 H(D,D);
> 12 return 0;
> 13 }
>
>
[toc] | [prev] | [next] | [standalone]
| From | olcott <polcott333@gmail.com> |
|---|---|
| Date | 2024-05-21 23:46 -0500 |
| Subject | Re: Can D correctly simulated by H reach its own line 06 and halt? |
| Message-ID | <v2jtal$114ps$2@dont-email.me> |
| In reply to | #384790 |
On 5/21/2024 11:40 PM, Bonita Montero wrote:
> Am 22.05.2024 um 06:37 schrieb olcott:
>> On 5/21/2024 11:29 PM, Bonita Montero wrote:
>>> Am 21.05.2024 um 20:48 schrieb olcott:
>>>> On 5/21/2024 1:39 PM, Bonita Montero wrote:
>>>>> Am 21.05.2024 um 20:24 schrieb olcott:
>>>>>> On 5/21/2024 1:13 PM, Bonita Montero wrote:
>>>>>>> Am 21.05.2024 um 20:09 schrieb olcott:
>>>>>>>> On 5/21/2024 1:01 PM, Bonita Montero wrote:
>>>>>>>>> Am 21.05.2024 um 16:09 schrieb olcott:
>>>>>>>>>
>>>>>>>>>> I am only asking the c experts here whether or not D correctly
>>>>>>>>>> simulated by *pure function* H can possibly reach its own line
>>>>>>>>>> 06 and halt for every H/D pair matching the template provided.
>>>>>>>>>
>>>>>>>>> Saying this is a question about C is like questioning something
>>>>>>>>> about physics in Polish and claiming this is a question about
>>>>>>>>> Polish.
>>>>>>>>
>>>>>>>> I am convinced that the question can be fully answered entirely
>>>>>>>> on the
>>>>>>>> basis of the semantics of C in the exact same way that the
>>>>>>>> termination
>>>>>>>> status of the following functions can be answered entirely on
>>>>>>>> the basis
>>>>>>>> of sufficient knowledge of the semantics of c.
>>>>>>>>
>>>>>>>> *If you believe otherwise then I ask for you to please justify
>>>>>>>> this*
>>>>>>>>
>>>>>>>> void Infinite_Recursion()
>>>>>>>> {
>>>>>>>> Infinite_Recursion();
>>>>>>>> }
>>>>>>>>
>>>>>>>> int factorial(int n) // called with 5
>>>>>>>> {
>>>>>>>> if (n >= 1)
>>>>>>>> return n*factorial(n-1);
>>>>>>>> else
>>>>>>>> return 1;
>>>>>>>> }
>>>>>>>>
>>>>>>>> void Infinite_Loop()
>>>>>>>> {
>>>>>>>> HERE: goto HERE;
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> This is possible with most languages so this isn't a question
>>>>>>> about C.
>>>>>>
>>>>>> None-the-less the semantics of my code template does seem
>>>>>> to prove the result that I stated. I would not even be here
>>>>>> except for the people in the other forum that consistently
>>>>>> lie about this.
>>>>>>
>>>>>
>>>>> You're neither asking about a C- or C++ problem.
>>>>> So use a proper newsgroup.
>>>>>
>>>>
>>>> There is no other group that knows enough about the semantics of the
>>>> C programming language and there is no other group still alive that
>>>> knows enough about the semantics of programming languages.
>>>>
>>>
>>> comp.theory is the most apppropriate group.
>>>
>>
>> They have proven to not be the right group because they have
>> consistently lied about this for two years.
>
> Maybe, but according to the topic this group fits.
*I AM GETTING NO WHERE WITH THEM ON THIS PAIR OF C FUNCTIONS*
D correctly simulated by H cannot possibly reach its own final
state at line 06 and halt because D correctly simulated by
H remains stuck in recursive simulation.
As soon as I get three people to sincerely concur then I
won't need these two groups any more.
>>
>> It is trivial to see that for every H/D pair of the infinite
>> set of H/D pairs that match the below template that
>>
>> D correctly simulated by H cannot possibly reach its own final
>> state at line 06 and halt because D correctly simulated by
>> H remains stuck in recursive simulation.
>>
>> This provides the basis for simulating termination analyzer H to
>> correctly determine that the halting problem's counter-example
>> input D cannot possibly halt.
>>
>> typedef int (*ptr)(); // ptr is pointer to int function in C
>> 00 int H(ptr p, ptr i);
>> 01 int D(ptr p)
>> 02 {
>> 03 int Halt_Status = H(p, p);
>> 04 if (Halt_Status)
>> 05 HERE: goto HERE;
>> 06 return Halt_Status;
>> 07 }
>> 08
>> 09 int main()
>> 10 {
>> 11 H(D,D);
>> 12 return 0;
>> 13 }
>>
>>
>
--
Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius
hits a target no one else can see." Arthur Schopenhauer
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2024-05-22 18:29 +0200 |
| Subject | Re: Can D correctly simulated by H reach its own line 06 and halt? |
| Message-ID | <v2l6hm$18q32$1@raubtier-asyl.eternal-september.org> |
| In reply to | #384796 |
Am 22.05.2024 um 15:52 schrieb olcott: > On 5/22/2024 5:01 AM, Bonita Montero wrote: >> Am 22.05.2024 um 06:46 schrieb olcott: >> >>> *I AM GETTING NO WHERE WITH THEM ON THIS PAIR OF C FUNCTIONS* >>> D correctly simulated by H cannot possibly reach its own final >>> state at line 06 and halt because D correctly simulated by >>> H remains stuck in recursive simulation. >>> As soon as I get three people to sincerely concur then I >>> won't need these two groups any more. >> >> Your question is determined to a small part with the language. >> And your question doesn't help others to write their code, >> neither it's related how to improve that code in C or C++. >> You're simply insane. >> >> > > So you disagree that D correctly simulated by H remains stuck in > recursive simulation and your basis for this assessment is an ad > hominem personal attack. > I only disagree on that this is a C- or C++-specific question.
[toc] | [prev] | [next] | [standalone]
| From | olcott <polcott333@gmail.com> |
|---|---|
| Date | 2024-05-22 08:52 -0500 |
| Subject | Re: Can D correctly simulated by H reach its own line 06 and halt? |
| Message-ID | <v2ktaq$16qp5$1@dont-email.me> |
| In reply to | #384796 |
On 5/22/2024 5:01 AM, Bonita Montero wrote: > Am 22.05.2024 um 06:46 schrieb olcott: > >> *I AM GETTING NO WHERE WITH THEM ON THIS PAIR OF C FUNCTIONS* >> D correctly simulated by H cannot possibly reach its own final >> state at line 06 and halt because D correctly simulated by >> H remains stuck in recursive simulation. >> As soon as I get three people to sincerely concur then I >> won't need these two groups any more. > > Your question is determined to a small part with the language. > And your question doesn't help others to write their code, > neither it's related how to improve that code in C or C++. > You're simply insane. > > So you disagree that D correctly simulated by H remains stuck in recursive simulation and your basis for this assessment is an ad hominem personal attack. -- Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius hits a target no one else can see." Arthur Schopenhauer
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2024-05-22 12:01 +0200 |
| Subject | Re: Can D correctly simulated by H reach its own line 06 and halt? |
| Message-ID | <v2kfq0$14g55$1@raubtier-asyl.eternal-september.org> |
| In reply to | #384796 |
Am 22.05.2024 um 06:46 schrieb olcott: > *I AM GETTING NO WHERE WITH THEM ON THIS PAIR OF C FUNCTIONS* > D correctly simulated by H cannot possibly reach its own final > state at line 06 and halt because D correctly simulated by > H remains stuck in recursive simulation. > As soon as I get three people to sincerely concur then I > won't need these two groups any more. Your question is determined to a small part with the language. And your question doesn't help others to write their code, neither it's related how to improve that code in C or C++. You're simply insane.
[toc] | [prev] | [next] | [standalone]
| From | olcott <polcott333@gmail.com> |
|---|---|
| Date | 2024-05-21 23:37 -0500 |
| Subject | Re: Can D correctly simulated by H reach its own line 06 and halt? |
| Message-ID | <v2jspc$114ps$1@dont-email.me> |
| In reply to | #384756 |
On 5/21/2024 11:29 PM, Bonita Montero wrote:
> Am 21.05.2024 um 20:48 schrieb olcott:
>> On 5/21/2024 1:39 PM, Bonita Montero wrote:
>>> Am 21.05.2024 um 20:24 schrieb olcott:
>>>> On 5/21/2024 1:13 PM, Bonita Montero wrote:
>>>>> Am 21.05.2024 um 20:09 schrieb olcott:
>>>>>> On 5/21/2024 1:01 PM, Bonita Montero wrote:
>>>>>>> Am 21.05.2024 um 16:09 schrieb olcott:
>>>>>>>
>>>>>>>> I am only asking the c experts here whether or not D correctly
>>>>>>>> simulated by *pure function* H can possibly reach its own line
>>>>>>>> 06 and halt for every H/D pair matching the template provided.
>>>>>>>
>>>>>>> Saying this is a question about C is like questioning something
>>>>>>> about physics in Polish and claiming this is a question about
>>>>>>> Polish.
>>>>>>
>>>>>> I am convinced that the question can be fully answered entirely on
>>>>>> the
>>>>>> basis of the semantics of C in the exact same way that the
>>>>>> termination
>>>>>> status of the following functions can be answered entirely on the
>>>>>> basis
>>>>>> of sufficient knowledge of the semantics of c.
>>>>>>
>>>>>> *If you believe otherwise then I ask for you to please justify this*
>>>>>>
>>>>>> void Infinite_Recursion()
>>>>>> {
>>>>>> Infinite_Recursion();
>>>>>> }
>>>>>>
>>>>>> int factorial(int n) // called with 5
>>>>>> {
>>>>>> if (n >= 1)
>>>>>> return n*factorial(n-1);
>>>>>> else
>>>>>> return 1;
>>>>>> }
>>>>>>
>>>>>> void Infinite_Loop()
>>>>>> {
>>>>>> HERE: goto HERE;
>>>>>> }
>>>>>>
>>>>>>
>>>>>
>>>>> This is possible with most languages so this isn't a question about C.
>>>>
>>>> None-the-less the semantics of my code template does seem
>>>> to prove the result that I stated. I would not even be here
>>>> except for the people in the other forum that consistently
>>>> lie about this.
>>>>
>>>
>>> You're neither asking about a C- or C++ problem.
>>> So use a proper newsgroup.
>>>
>>
>> There is no other group that knows enough about the semantics of the
>> C programming language and there is no other group still alive that
>> knows enough about the semantics of programming languages.
>>
>
> comp.theory is the most apppropriate group.
>
They have proven to not be the right group because they have
consistently lied about this for two years.
It is trivial to see that for every H/D pair of the infinite
set of H/D pairs that match the below template that
D correctly simulated by H cannot possibly reach its own final
state at line 06 and halt because D correctly simulated by
H remains stuck in recursive simulation.
This provides the basis for simulating termination analyzer H to
correctly determine that the halting problem's counter-example
input D cannot possibly halt.
typedef int (*ptr)(); // ptr is pointer to int function in C
00 int H(ptr p, ptr i);
01 int D(ptr p)
02 {
03 int Halt_Status = H(p, p);
04 if (Halt_Status)
05 HERE: goto HERE;
06 return Halt_Status;
07 }
08
09 int main()
10 {
11 H(D,D);
12 return 0;
13 }
--
Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius
hits a target no one else can see." Arthur Schopenhauer
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2024-05-22 06:29 +0200 |
| Subject | Re: Can D correctly simulated by H reach its own line 06 and halt? |
| Message-ID | <v2jsa6$114s9$1@raubtier-asyl.eternal-september.org> |
| In reply to | #384756 |
Am 21.05.2024 um 20:48 schrieb olcott:
> On 5/21/2024 1:39 PM, Bonita Montero wrote:
>> Am 21.05.2024 um 20:24 schrieb olcott:
>>> On 5/21/2024 1:13 PM, Bonita Montero wrote:
>>>> Am 21.05.2024 um 20:09 schrieb olcott:
>>>>> On 5/21/2024 1:01 PM, Bonita Montero wrote:
>>>>>> Am 21.05.2024 um 16:09 schrieb olcott:
>>>>>>
>>>>>>> I am only asking the c experts here whether or not D correctly
>>>>>>> simulated by *pure function* H can possibly reach its own line
>>>>>>> 06 and halt for every H/D pair matching the template provided.
>>>>>>
>>>>>> Saying this is a question about C is like questioning something
>>>>>> about physics in Polish and claiming this is a question about
>>>>>> Polish.
>>>>>
>>>>> I am convinced that the question can be fully answered entirely on the
>>>>> basis of the semantics of C in the exact same way that the termination
>>>>> status of the following functions can be answered entirely on the
>>>>> basis
>>>>> of sufficient knowledge of the semantics of c.
>>>>>
>>>>> *If you believe otherwise then I ask for you to please justify this*
>>>>>
>>>>> void Infinite_Recursion()
>>>>> {
>>>>> Infinite_Recursion();
>>>>> }
>>>>>
>>>>> int factorial(int n) // called with 5
>>>>> {
>>>>> if (n >= 1)
>>>>> return n*factorial(n-1);
>>>>> else
>>>>> return 1;
>>>>> }
>>>>>
>>>>> void Infinite_Loop()
>>>>> {
>>>>> HERE: goto HERE;
>>>>> }
>>>>>
>>>>>
>>>>
>>>> This is possible with most languages so this isn't a question about C.
>>>
>>> None-the-less the semantics of my code template does seem
>>> to prove the result that I stated. I would not even be here
>>> except for the people in the other forum that consistently
>>> lie about this.
>>>
>>
>> You're neither asking about a C- or C++ problem.
>> So use a proper newsgroup.
>>
>
> There is no other group that knows enough about the semantics of the
> C programming language and there is no other group still alive that
> knows enough about the semantics of programming languages.
>
comp.theory is the most apppropriate group.
[toc] | [prev] | [next] | [standalone]
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Date | 2024-05-21 22:15 -0700 |
| Subject | Partial function types |
| Message-ID | <86zfsiv345.fsf_-_@linuxsc.com> |
| In reply to | #384642 |
[I am responding to a post in comp.lang.c++, but the subject is
C, so the response is directed to comp.lang.c.]
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> wij <wyniijj5@gmail.com> writes:
> [...]
>
>> typedef int (*ptr)(); // ptr is pointer to int function
>> int H(ptr x, ptr y);
>> int D(ptr x)
>> {
>> int Halt_Status = H(x, x);
>> if (Halt_Status)
>> HERE: goto HERE;
>> return Halt_Status;
>> }
>>
>> int main()
>> {
>> H(D,D);
>> return 0;
>> }
>>
>> The code above does not compile:
>
> Yes, it does (as you acknowledge in a later post).
>
> This:
> typedef int (*ptr)();
> defines "ptr" as an alias for a type that can be described in English
> as "pointer to function returning int". The empty parentheses
> indicate that the function takes an unspecified but fixed number
> and type(s) of arguments; this is an old-style declaration. [...]
>
> The function H is declared but not defined. [...]
> I'll note that the code (declares and) defines the function D,
> but never calls it. The address of D is passed to H, but without
> a definition of H we can't guess what it does with that address.
All good up to this point.
> It's possible to rewrite the code to (a) avoid the use of old-style
> function declarations [...]
Not without radically altering the code. Because D is passed
as an argument to H, and because of how H and D are declared,
the type of (the address of) D has to match the type of D's
first parameter. It isn't possible to do this in C without
resorting to a partial function type somewhere (because the
type of D is infinitely recursive).
There are other ways to work around this problem, for example
involving having a pointer-to-function member in a struct,
but that would entail changing either the declarations or
the call of H() with D as an argument, which seems to be
stretching the bounds of "rewrite the code".
> The code as presented is a valid C *translation unit*, but it
> is not a valid *program*,
It might be better to say it's a valid partial program, but not
a complete program.
> and it has no behavior.
It doesn't have behavior in the sense that it doesn't do anything.
It does have behavior in the sense that the C standard prescribes
a meaning for the declarations and definitions given. I believe
the C standard uses the term "behavior" in both of those senses.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2024-05-21 23:27 -0700 |
| Subject | Re: Partial function types |
| Message-ID | <87ttiq5pkm.fsf@nosuchdomain.example.com> |
| In reply to | #384814 |
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> [I am responding to a post in comp.lang.c++, but the subject is
> C, so the response is directed to comp.lang.c.]
>
> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>
>> wij <wyniijj5@gmail.com> writes:
>> [...]
>>
>>> typedef int (*ptr)(); // ptr is pointer to int function
>>> int H(ptr x, ptr y);
>>> int D(ptr x)
>>> {
>>> int Halt_Status = H(x, x);
>>> if (Halt_Status)
>>> HERE: goto HERE;
>>> return Halt_Status;
>>> }
>>>
>>> int main()
>>> {
>>> H(D,D);
>>> return 0;
>>> }
>>>
>>> The code above does not compile:
>>
>> Yes, it does (as you acknowledge in a later post).
>>
>> This:
>> typedef int (*ptr)();
>> defines "ptr" as an alias for a type that can be described in English
>> as "pointer to function returning int". The empty parentheses
>> indicate that the function takes an unspecified but fixed number
>> and type(s) of arguments; this is an old-style declaration. [...]
>>
>> The function H is declared but not defined. [...]
>
>> I'll note that the code (declares and) defines the function D,
>> but never calls it. The address of D is passed to H, but without
>> a definition of H we can't guess what it does with that address.
>
> All good up to this point.
>
>> It's possible to rewrite the code to (a) avoid the use of old-style
>> function declarations [...]
>
> Not without radically altering the code. Because D is passed
> as an argument to H, and because of how H and D are declared,
> the type of (the address of) D has to match the type of D's
> first parameter. It isn't possible to do this in C without
> resorting to a partial function type somewhere (because the
> type of D is infinitely recursive).
What I had in mind, though I didn't take the time to dig into it,
was to define a "generic" pointer-to-function type and use casts
where necessary.
But I don't understand the intended semantics well enough to be sure
of how to rewrite it. (I don't consider this lack of understanding
to be a problem.)
> There are other ways to work around this problem, for example
> involving having a pointer-to-function member in a struct,
> but that would entail changing either the declarations or
> the call of H() with D as an argument, which seems to be
> stretching the bounds of "rewrite the code".
>
>> The code as presented is a valid C *translation unit*, but it
>> is not a valid *program*,
>
> It might be better to say it's a valid partial program, but not
> a complete program.
I don't see how that's better.
>> and it has no behavior.
>
> It doesn't have behavior in the sense that it doesn't do anything.
> It does have behavior in the sense that the C standard prescribes
> a meaning for the declarations and definitions given. I believe
> the C standard uses the term "behavior" in both of those senses.
I believe it does not. N1570 3.4 defines "behavior" as "external
appearance or action". Behavior does not occur until execution time.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
| From | Marcel Mueller <news.5.maazl@spamgourmet.org> |
|---|---|
| Date | 2024-05-20 15:14 +0200 |
| Message-ID | <v2fic3$3rvp3$1@gwaiyur.mb-net.net> |
| In reply to | #384618 |
Am 18.05.24 um 23:40 schrieb olcott: > In the above case a simulator is an x86 emulator that correctly emulates > at least one of the x86 instructions of D in the order specified by the > x86 instructions of D. > > This may include correctly emulating the x86 instructions of H in the > order specified by the x86 instructions of H thus calling H(D,D) in > recursive simulation. There is no recursion. H is an undefined reference. There is nothing to simulate. And even if H would be defined, the implementation of H might never call *x or *y. > Line 03: simulated D(D) invokes simulated H(D,D) that simulates D(D) > > *Simulation invariant* > D correctly simulated by H cannot possibly reach past its own line 03. So this is proven not to be true in general. Marcel
[toc] | [prev] | [next] | [standalone]
| From | olcott <polcott333@gmail.com> |
|---|---|
| Date | 2024-05-20 10:10 -0500 |
| Message-ID | <v2fp4j$1pfh$2@dont-email.me> |
| In reply to | #384652 |
On 5/20/2024 8:14 AM, Marcel Mueller wrote:
> Am 18.05.24 um 23:40 schrieb olcott:
>> In the above case a simulator is an x86 emulator that correctly emulates
>> at least one of the x86 instructions of D in the order specified by the
>> x86 instructions of D.
>>
>> This may include correctly emulating the x86 instructions of H in the
>> order specified by the x86 instructions of H thus calling H(D,D) in
>> recursive simulation.
>
> There is no recursion.
> H is an undefined reference. There is nothing to simulate.
>
> And even if H would be defined, the implementation of H might never call
> *x or *y.
>
>> Line 03: simulated D(D) invokes simulated H(D,D) that simulates D(D)
>>
>> *Simulation invariant*
>> D correctly simulated by H cannot possibly reach past its own line 03.
>
> So this is proven not to be true in general.
>
>
> Marcel
https://en.wikipedia.org/wiki/Pure_function#
*Try to find any way that*
For every H/D pair of the template below where D correctly simulated
by pure function (thus computable function) H can possibly reach its
own final state at line 06 and halt.
typedef int (*ptr)(); // ptr is pointer to int function
00 int H(ptr p, ptr i);
01 int D(ptr p)
02 {
03 int Halt_Status = H(p, p);
04 if (Halt_Status)
05 HERE: goto HERE;
06 return Halt_Status;
07 }
08
09 int main()
10 {
11 H(D,D);
12 return 0;
13 }
In the above case a simulator is an x86 emulator that correctly emulates
at least one of the x86 instructions of D in the order specified by the
x86 instructions of D.
This may include correctly emulating the x86 instructions of H in the
order specified by the x86 instructions of H thus calling H(D,D) in
recursive simulation.
Execution Trace
Line 11: main() invokes H(D,D);
keeps repeating (unless aborted)
Line 01:
Line 02:
Line 03: simulated D(D) invokes simulated H(D,D) that simulates D(D)
Simulation invariant:
D correctly simulated by H cannot possibly reach past its own line 03.
For every H/D pair of the above template D correctly simulated by pure
function (thus computable function) H cannot possibly reach its own
final state at line 06 and halt.
--
Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius
hits a target no one else can see." Arthur Schopenhauer
[toc] | [prev] | [next] | [standalone]
| From | olcott <polcott333@gmail.com> |
|---|---|
| Date | 2024-05-20 10:13 -0500 |
| Message-ID | <v2fpas$1pfh$4@dont-email.me> |
| In reply to | #384652 |
On 5/20/2024 8:14 AM, Marcel Mueller wrote:
> Am 18.05.24 um 23:40 schrieb olcott:
>> In the above case a simulator is an x86 emulator that correctly emulates
>> at least one of the x86 instructions of D in the order specified by the
>> x86 instructions of D.
>>
>> This may include correctly emulating the x86 instructions of H in the
>> order specified by the x86 instructions of H thus calling H(D,D) in
>> recursive simulation.
>
> There is no recursion.
> H is an undefined reference. There is nothing to simulate.
>
> And even if H would be defined, the implementation of H might never call
> *x or *y.
>
>> Line 03: simulated D(D) invokes simulated H(D,D) that simulates D(D)
>>
>> *Simulation invariant*
>> D correctly simulated by H cannot possibly reach past its own line 03.
>
> So this is proven not to be true in general.
>
>
> Marcel
Here is the whole statement.
*Try to find any way that*
For every H/D pair of the template below where D correctly simulated
by pure function (thus computable function) H can possibly reach its
own final state at line 06 and halt.
typedef int (*ptr)(); // ptr is pointer to int function
00 int H(ptr p, ptr i);
01 int D(ptr p)
02 {
03 int Halt_Status = H(p, p);
04 if (Halt_Status)
05 HERE: goto HERE;
06 return Halt_Status;
07 }
08
09 int main()
10 {
11 H(D,D);
12 return 0;
13 }
In the above case a simulator is an x86 emulator that correctly emulates
at least one of the x86 instructions of D in the order specified by the
x86 instructions of D.
This may include correctly emulating the x86 instructions of H in the
order specified by the x86 instructions of H thus calling H(D,D) in
recursive simulation.
Execution Trace
Line 11: main() invokes H(D,D);
keeps repeating (unless aborted)
Line 01:
Line 02:
Line 03: simulated D(D) invokes simulated H(D,D) that simulates D(D)
Simulation invariant:
D correctly simulated by H cannot possibly reach past its own line 03.
For every H/D pair of the above template D correctly simulated by pure
function (thus computable function) H cannot possibly reach its own
final state at line 06 and halt.
--
Copyright 2024 Olcott "Talent hits a target no one else can hit; Genius
hits a target no one else can see." Arthur Schopenhauer
[toc] | [prev] | [standalone]
Page 7 of 7 — ← Prev page 1 2 3 4 5 6 [7]
Back to top | Article view | comp.lang.c
csiph-web