Sujet : Re: Suggested method for returning a string from a C program?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 21. Mar 2025, 18:12:23
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250321095755.499@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-03-21,
Muttley@DastardlyHQ.org <
Muttley@DastardlyHQ.org> wrote:
On Thu, 20 Mar 2025 16:49:10 -0000 (UTC)
Kaz Kylheku <643-408-1753@kylheku.com> wibbled:
On 2025-03-20, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
On Thu, 20 Mar 2025 16:14:54 -0000 (UTC)
Kaz Kylheku <643-408-1753@kylheku.com> wibbled:
On 2025-03-20, Muttley@DastardlyHQ.org <Muttley@DastardlyHQ.org> wrote:
I guess some maths problems can't be proven directly, they have to be -
for
want of a better word - run. A bit like the halting problem in CS.
>
The halting problem is a perfect example of a problem which *cannot* be
proven by running anything.
>
So if you run the program and it halts that doesn't prove that it will halt?
Umm, ok.
>
If you run a program and it has NOT halted so far, you don't know
whether or not it halts. If it doesn't halt, you will wait forever. To
>
True, but you said it cannot be proven. What you meant was it cannot *always*
be proven to halt.
Running a program can only prove those programs which terminate
within a time period you're willing to wait. For all others, this
approach produces no answer: it remains undecided.
You don't seem to know what is the Halting Problem in CS; it is
the informal name for the question whether there exists an
algorithm which can prove that any program operating on any
input (i.e. any Turing computation) will halt or not.
The question "will this small C program halt, which obviously contains
no loops or recursion, so we know that it does" is not an instance of
the Halting Problem. (It is one input case in the Halting Problem,
among an infinity of cases.)
Running programs is not a decision procedure that solves the Halting
Problem.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca