W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2008

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

From: <bugzilla@wiggum.w3.org>
Date: Thu, 07 Feb 2008 13:57:14 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1JN7Fa-0003CK-N2@wiggum.w3.org>

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

           Summary: [FS] Static type analysis for the fn:abs, fn:ceiling,
                    fn:floor, fn:round, and fn:round-half-to-even functions
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: jmdyck@ibiblio.org
        ReportedBy: oliver@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


The static type analysis rules for fn:abs, fn:ceiling, fn:floor, fn:round, and
fn:round-half-to-even are defined in section 7.2.3:

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 assume we
are looking for the least type satisfying the inference rule.

Consider an argument of type numeric(), then the only type satisfying the rule
is xs:double.  If the argument has (for example) an xs:integer value, the
return type is xs:integer which disagrees with this inferred type.

It seems that typing rules similar to those in section C.2 need to be applied
in this case.
Received on Thursday, 7 February 2008 13:57:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:49 GMT