🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #235

Re: Documentation (was Re: Performance of xchg reg,reg)

#235
From: Dan Cross
Date: Tue, 20 Oct 2026 02:05
62 lines
3461 bytes
In article <7tocdllvftsndin92d9q2kjf90if8dha8p@4ax.com>,
George Neuner  <gneuner2@comcast.net> wrote:
>On Mon, 19 Oct 2026 01:52:51 -0000 (UTC),
>cross@spitfire.i.gajendra.net (Dan Cross) wrote:
>
>>In article <6ad5609b.8505984@news.eternal-september.org>,
>>John Savard <quadibloc@invalid.com> wrote:
>>>On Sun, 18 Oct 2026 09:45:00 -0400, George Neuner
>>><gneuner2@comcast.net> wrote:
>>>
>>>>The problem with the original report was that they attempted with the
>>>>grammar turn [at least some kinds of] semantic errors into syntax
>>>>errors.
>>>
>>>Obviously, there's no way one can enable a compiler to flag logic
>>>errors in programs. A Turing-complete language can calculate anything,
>>>so how can it tell you that you were calculating this when you wanted
>>>to calculate that?
>>
>>With apologies, arguments like these always seem to me to miss
>>the forest for the trees a bit.  Some constructs clearly violate
>>the documented semantics of e.g. a language.
>>
>>Yes, these langauges are all Turing-complete and so on, and no,
>>we cannot solve _The_ Halting Problem, in all of its glorious
>>generality.  But, we can solve any number of specific halting
>>_problems_.  For example, I can see that, `for (;;);` is a loop
>>that does not terminate.  With enough effort, I can take that
>>down some reasonably long paths.
>>
>>So, too, one can spot a lot of logic errors.  There's no reason
>>a compiler can't see this, for example:
>>
>>?	if (ptr == NULL) {
>>?		int v = *ptr++;
>>?		*ptr = v + 10;
>>?	}
>>
>>And flag it with a error: "you dereferenced a pointer right
>>after you asserted it was nil; did you invert the condition?"
>
>Absolutely compiler analysis can catch (some) semantic errors ... that
>never was in question.  

Sorry, I was referring specifically to the factually incorrect
statement that "there's no way one can enable a compiler to flag
logic errors in programs," quoted above, which is flatly
incorrect.

>The problem with the *original* Algol68 report was that they tried to
>encode semantics using the syntax, the idea being that the parser then
>could catch semantic errors as syntax errors.
>
>The revised report changed direction: the syntax no longer tried to
>encode the semantics ... but it still was hard to read because the
>syntax definitions made copious /reference/ to semantics discussed in
>accompanying text.

Oophf.  Sounds painful.

	- Dan C.
Technical Details
Message-ID: <11b6i8h$hn8$1@reader2.panix.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
References: <2026Oct13.104347@mips.complang.tuwien.ac.at> <6ad5609b.8505984@news.eternal-september.org> <11b3t5j$h7l$1@reader2.panix.com> <7tocdllvftsndin92d9q2kjf90if8dha8p@4ax.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cross@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.arch
Subject: Re: Documentation (was Re: Performance of xchg reg,reg)
Date: Tue, 20 Oct 2026 02:05:05 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <11b6i8h$hn8$1@reader2.panix.com>
References: <2026Oct13.104347@mips.complang.tuwien.ac.at> <6ad5609b.8505984@news.eternal-september.org> <11b3t5j$h7l$1@reader2.panix.com> <7tocdllvftsndin92d9q2kjf90if8dha8p@4ax.com>
Injection-Date: Tue, 20 Oct 2026 02:05:05 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
	logging-data="18152"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)