Joseph S. Myers wrote: > If an operation that overflows has been carried out, may the AIR abstract > machine then trap at any future time (if the implementation has moved or > copied the relevant operation to that future time)?
I think that's answered on p.12 isn't it? " AIR Integers do not require Ada-style precise traps, which require that an exception is raised every time there is an integer overflow. In the AIR integer model, it is acceptable to delay catching an incorrectly represented value until an observation point is reached just before it either affects the output or causes a critical undefined behavior " > That would suggest > the abstract machine involves a one-way transition to a potentially > trapping state - but the semantics for operations on out-of-range values > need to be defined to say what happens in that state for as long as the > machine has not actually trapped. I read the notion of "observation points" as saying that it can only defer that trap until there's a possibility for the out-of-range value to "make a difference" to anything. So you might run on for a while calculating with gibberish truncated values in registers, but you have to take the trap before you store any of those results anywhere visible. Hence also why non-critical undefined behaviour is allowed to be caused by an o-o-r integer, the gibberish computations would count as such undefined behaviour. It does seem to me too that this document makes a lot of references to "The AIR integer model", and even enumerates some of the properties and corner-cases of the model, but does not actually clearly *define* the "AIR integer model" in terms that could be used as a spec or to create a compatible and behaviourally-identical version. Not saying that getting some practical experience with an experimental compiler isn't a good way to research the details and issues you're going to run into, but the model definitely needs to be refined into something far more detailed and specific, written to the same sort of level of detail as the C and C++ specs. cheers, DaveK