C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] C trap representations and unspecified values versus C++ indeterminate values

From: Uecker, Martin <Martin.Uecker_at_[hidden]>
Date: Sat, 10 Oct 2020 14:07:37 +0000
Am Samstag, den 10.10.2020, 13:49 +0200 schrieb Freek Wiedijk via Liaison:
> Dear all,
>
> This seems to be the DR451 discussion about "wobbly values"
> all over again.
>
> I think that having a memory model decorated with effective
> types, provenance, wobbliness, and what other decorations
> one can invent, is not the most elegant approach. I'm all
> for Peter's attempt to get the C standard precise (it
> currently isn't), and very much want to support him in this.
> But I don't like the specific proposal of the provenance
> study group. I think it's much too hacky.

Can you make this more precise?

> I would expect that having a two layer model, in which
> one has an abstract memory model (where values are typed
> and abstract, and in which "uninitialized" is one of the
> possible values, with undefined behavior if you want to
> use it) and a concrete memory model (in which the values
> consists of "object representations", i.e., of a sequences
> of bytes) has much more potential. In such a model those
> two layers should be updated simultaneously and be kept in
> sync all the time, where one side of the model model can
> use information from the other side if it needs it.

This is exactly what we have and the provenance proposal
just makes some part of it precise. We have a model for the
abstract machine which has more information than what is
typically avaiable at run-time (effective type, provenance,
etc.)

> Then the effective types, provenance, wobbly values, etc.,
> would just be that the abstract model has precedence,
> and the concrete memory model only comes into play if
> the abstract model doesn't have enough information, and
> therefore these notions would not be needed anymore.



> I think there is a Korean memory model that is a bit like that?
>
> Freek
> _______________________________________________
> Liaison mailing list
> Liaison_at_[hidden]
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/liaison
> Link to this post: http://lists.isocpp.org/liaison/2020/10/0209.php

Received on 2020-10-10 09:07:45