[Bug 1728] New: [FS] stronger inference is possible in 7.2.13 "fn:subsequence"

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

           Summary: [FS] stronger inference is possible in 7.2.13
                    "fn:subsequence"
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Formal Semantics
        AssignedTo: simeon@us.ibm.com
        ReportedBy: fred.zemke@oracle.com
         QAContact: public-qt-comments@w3.org


7.2.13 fn:subsequence
When the third argument is 1 and the Expr's quantifier is *,
one can conclude that the length of 
the result is 0 or 1, ie, the quantifier is ?, without even 
knowing the second argument.  Thus the 
third and fourth inferences under "static analysis" can be combined
into a single and more powerful rule, to wit

statEnv |- Expr1 : Type
quantifier (Type) in {*}
------------------------
statEnv |- fn:subsequence (Expr1, Expr2, 1) : prime(Type)?

However, I note that the first sentence of the section says that 
the section only applies when the second argument is 1 or fs:last,
so perhaps it was decided to deliberately forgo this opportunity.

Received on Monday, 18 July 2005 21:47:56 UTC