[Bug 5459] [FS] Static type analysis for the fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5459





------- Comment #2 from jmdyck@ibiblio.org  2008-02-12 03:36 -------
(In reply to comment #0)
>
> The second sentence reads:
> Note that the fact that the type should be the least is cannot expressed by
> the inference rule notation used here.
> 
> Firstly, the phrase "least is cannot expressed by" makes no sense

I agree, but that was already raised in Bug 1756 Comment #3, and fixed in FS
erratum E014, by changing "is cannot expressed" to "is not expressed".

> I assume we are looking for the least type satisfying the inference rule.

Yes, where "least" means "lowest on the type promotion ladder".

> Consider an argument of type numeric(), then the only type satisfying the rule
> is xs:double.

I don't understand what you mean. As far as I can tell, there is no type
numeric(). Or xs:numeric.

In the F+O spec, the functions in question are "declared" with a parameter type
of "numeric?", but section 1.4 explains that this is just a shorthand for four
declarations, each with a specific atomic type.

Received on Tuesday, 12 February 2008 03:36:25 UTC