This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1563 - [FS] technical: 4 Expressions
Summary: [FS] technical: 4 Expressions
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Last Call drafts
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Jerome Simeon
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-13 05:02 UTC by Michael Dyck
Modified: 2005-09-06 12:58 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2005-07-13 05:02:59 UTC
STA / rule 1
    This rule doesn't say what you mean. The prose says (roughly):
        error = (Expr has empty type) and not(Expr is an exception)
    which means (via one of De Morgan's laws)
        not(error) = not(Expr has empty type) or (Expr is an exception)
    which is not at all what the rule says.

    Specifically, if Expr is one of the exceptions, then (regardless of
    its type!), the prose says that it is *not* an error, but the rule
    says that it *is* an error (because premise 2 fails to hold, and so
    the rule fails to hold, and so supposedly an error is raised).

    All of which is moot, because the rule's conclusion is the same as
    premise 1, so an inference procedure would have no need to apply the
    rule. (So whether it fails or not is inconsequential.)

    It seems to me that the more straightforward way to write the rule is:

        statEnv |- Expr : Type
        Type = empty
        not( Expr is an exception )
        ---------------------------
        statEnv |- Expr raises error

    although it's unclear whether the inference procedure is obliged to
    try to satisfy the rule.

    A more robust alternative would be to go to the STA for each
    expression other than the exceptions, and add a
        not(Type = empty)
    premise (if it's not already implied by other premises).
Comment 1 Jerome Simeon 2005-07-20 23:15:43 UTC
I believe your analysis is correct. Your proposed suggested rule looks quite good.
- Jerome and Michael
Comment 2 Jerome Simeon 2005-07-22 00:27:39 UTC
The working group has approved your proposed change to the static typing rule
in Section [FS] technical: 4 Expressions.

- Jerome Simeon
On behalf of the XML Query and XSLT WGs