• Re: Semantic properties of finite string inputs --- many months ofcareful crafting

    From Tristan Wibberley@tristan.wibberley+netnews2@alumni.manchester.ac.uk to comp.theory,comp.lang.c on Sat Nov 1 21:39:33 2025
    From Newsgroup: comp.lang.c

    Follow-up set comp.lang.c

    On 01/11/2025 02:45, Richard Damon wrote:

    .. [stuff I think is about the invalidity of not completing execution] isn't a valid definition ...

    Let's suppose C disallows abort due to external events... Then no
    conforming C implementation exists.

    I think we must suppose that susceptibility to power-cuts do not render
    C implementations non-conforming.

    That means a C implementation must only execute a program without
    issuing a diagnostic if it has undefined behaviour sufficiently early in
    its execution that any abort due to a power-cut, for instance, is permitted.

    --
    Tristan Wibberley

    The message body is Copyright (C) 2025 Tristan Wibberley except
    citations and quotations noted. All Rights Reserved except that you may,
    of course, cite it academically giving credit to me, distribute it
    verbatim as part of a usenet system or its archives, and use it to
    promote my greatness and general superiority without misrepresentation
    of my opinions other than my opinion of my greatness and general
    superiority which you _may_ misrepresent. You definitely MAY NOT train
    any production AI system with it but you may train experimental AI that
    will only be used for evaluation of the AI methods it implements.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Tristan Wibberley@tristan.wibberley+netnews2@alumni.manchester.ac.uk to comp.lang.c on Sat Nov 1 22:16:01 2025
    From Newsgroup: comp.lang.c

    On 01/11/2025 21:39, Tristan Wibberley wrote:
    Follow-up set comp.lang.c

    On 01/11/2025 02:45, Richard Damon wrote:

    .. [stuff I think is about the invalidity of not completing execution] isn't a valid definition ...

    Let's suppose C disallows abort due to external events... Then no
    conforming C implementation exists.

    I think we must suppose that susceptibility to power-cuts do not render
    C implementations non-conforming.

    That means a C implementation must only execute a program without
    issuing a diagnostic if it has undefined behaviour sufficiently early in
    its execution that any abort due to a power-cut, for instance, is permitted.

    ugh, late at night, my ability to put two sentences together has
    diminished. sorry.

    --
    Tristan Wibberley

    The message body is Copyright (C) 2025 Tristan Wibberley except
    citations and quotations noted. All Rights Reserved except that you may,
    of course, cite it academically giving credit to me, distribute it
    verbatim as part of a usenet system or its archives, and use it to
    promote my greatness and general superiority without misrepresentation
    of my opinions other than my opinion of my greatness and general
    superiority which you _may_ misrepresent. You definitely MAY NOT train
    any production AI system with it but you may train experimental AI that
    will only be used for evaluation of the AI methods it implements.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From James Kuyper@jameskuyper@alumni.caltech.edu to comp.lang.c on Sun Nov 2 21:19:33 2025
    From Newsgroup: comp.lang.c

    On 2025-11-01 17:39, Tristan Wibberley wrote:
    Follow-up set comp.lang.c

    On 01/11/2025 02:45, Richard Damon wrote:

    .. [stuff I think is about the invalidity of not completing execution] isn't a valid definition ...

    Let's suppose C disallows abort due to external events... Then no
    conforming C implementation exists.

    I think we must suppose that susceptibility to power-cuts do not render
    C implementations non-conforming.

    Correct. What a power cut does is make a conforming implementation of C
    fail to continue qualifying as a implementation.

    In 1.6 of C89, an implementation is defined as "a particular set of
    software, running in a particular translation environment under
    particular control options, that performs translation of programs for,
    and supports execution of functions in, a particular execution environment."

    Thus, when the power is cut, the software ceases to run, so it ceases to
    be an implementation, and in particular, ceases to be a conforming implementation.

    There's important wording that wasn't added to the standard until C99
    that clarified something that was already considered to be true: "A
    program that is correct in all other aspects, operating on correct data, containing unspecified behavior shall be a correct program and act in accordance with 5.1.2.3." (4p3). The peculiar wording is intended to
    make clear that unspecified behavior does not relieve an implementation
    of this requirement.
    Section 5.1.2.3 indirectly references most of the rest of the standard,
    while defining that only the observable behavior of a program has to
    match what the standard says - that behavior doesn't have to be
    generated in the fashion that the standard describes. Section 5.1.2.3 in
    C99 corresponds to 2.1.2.3 in C89.

    The rest of the standard defines, among other things, how a program
    exits. If the behavior of the program is not undefined, it can only exit
    by reaching the end of the main() function, or by calling certain
    library functions. If there is any observable behavior that allows you determine that it ended by any other method, the implementation is non-conforming.
    --- Synchronet 3.21a-Linux NewsLink 1.2