Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Limitation of MS-DOS C compiler? (was Re: Should I convert FORTRAN code to C?)
Date: Tue, 27 Dec 2022 19:38:24 -0800
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <86wn6curin.fsf@linuxsc.com>
References: <10655@agate.BERKELEY.EDU> <1857@hubcap.UUCP> <8807121629.AA07169@explorer.dgp.toronto.edu> <2807@ttrdc.UUCP> <853b5253-ab29-4e38-9e81-a1d9312e5e2dn@googlegroups.com> <86y1quwbc0.fsf@linuxsc.com> <87lemumdsj.fsf@bsb.me.uk> <865ydyvwyq.fsf@linuxsc.com> <87y1qslrqw.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader01.eternal-september.org; posting-host="38ac7d2bf94e0515b2526fa483f331a9"; logging-data="4075844"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nlGYJmG3lLBktxYs99bYrq1el3fHNkaM="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:okumJqv3T5FI0MfSc5slugyT2Lk= sha1:25Npzr60DeA1R6YdjAN8/enVo2s=
Xref: csiph.com comp.lang.c:168677
Ben Bacarisse writes:
[..pruning mercilessly..]
> Tim Rentsch writes:
[.. concerning C being Turing complete ..]
> I think this is going to get messy because I contend that C
> (certainly freestanding C) already excludes an infinite number of
> computable functions because it's model is everywhere bounded.
> (Yes, I know we might want to consider IO to be essentially
> unbounded.)
>
> But that's a side issue!
Okay, I will ignore that question.
> I meant only that the kind of processing the example indulged in
> could be deemed invalid without affecting C's Turing completeness.
> You considered the program "large" in that it generated a huge
> post-processing input. C could have declared such "large" programs
> to be invalid.
What I think you're saying here is C could disallow large
programs when the largeness comes mostly from macro expansion
(and so we don't need to consider the question of the language
being Turing complete). I think that's right, although I'm not
sure if such a determination could be done cheaply enough; the
cost of deciding when the limit is exceeded might be too high
to be practical. Also I'm not sure how to define the property
in a precise way; no doubt it could be done, but I suspect
making the definition precise would give a result that is
complicated and hard to understand. (But I'm not asking for a
concrete proposal.)
If you're saying something else then I don't know what it is.
>> Incidentally, the processing time needed is irrelevant. The
>> compiler will run out of memory long before it runs out of CPU
>> cycles.
>
> Yes. "Compile-time costs" was supposed to mean costs (in terms
> of resources) incurred at compile time.
Oh, but this matters. The amount of memory required to see if
the macro-processing-expansion limit is exceeded (even when it is
not) might be too large for a determination to be made. Oops!
Have we made any progress towards understanding each other? I
hope we have. :)