[Bug 1547] New: [FS] editorial: 3.2.1 Processing model

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

           Summary: [FS] editorial: 3.2.1 Processing model
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: simeon@us.ibm.com
        ReportedBy: jmdyck@ibiblio.org
         QAContact: public-qt-comments@w3.org


3.2.1 Processing model

"Static analysis is further divided into four sub-phases. Each phase
consumes the result of the previous phase and generates output for
the next phase. ...
Static analysis consists of the following sub-phases
1. Parsing
2. Static Context Processing
3. Normalization
4. Static type analysis"
    In fact, as section 5 tells us, some Normalization ([]_PrologDecl)
    happens as part of SCP, and some ([]_sequencetype) as part of STA.
    Moreover, some STA happens as part of SCP (5.14, 5.15).  So
    "sub-phases" 2, 3, and 4 are not as assembly-line as you indicate.
(leftover from last year, comment #029)

"Normalization works by bottom-up application of normalization rules over
expressions, starting with normalization of literal expressions and
variables."
    I disagree that it's necessarily bottom-up. You could equally say that
    it starts at the top with an invocation like [[ QueryBody ]]_Expr or
    [[ PrologDecl ]]_PrologDecl, which then proceeds by invoking
    successively lower-level rules.

"The formal description of evaluation works by bottom-up application of
evaluation rules over expressions, starting with evaluation of literals
and variables."
    How can you possibly evaluate a variable reference if you haven't yet
    evaluated its declaration, which is higher up in the tree?

    You say "Note that in practice some implementations may prefer
    top-down evaluation strategies." But if it's a matter of preference,
    how can you say it's one or the other?

"32 bits integers"
    s/bits/bit/

Received on Monday, 11 July 2005 07:11:41 UTC