On Fri, 24 Jul 2009, Dave Korn wrote:

> 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  "

Yes, approximately; I was speculating as to how you might define abstract 
machine semantics for which this document might be a rough overview, and 
the potentially trapping state seems to be part of that.

Regarding observation points, I think that

  printf("%d\n", INT_MAX * INT_MAX);

should naturally in this model be permitted to print the value of INT_MAX 
* INT_MAX, or to trap, rather than being required to trap.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to