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 1547 - [FS] editorial: 3.2.1 Processing model
Summary: [FS] editorial: 3.2.1 Processing model
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 minor
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-11 07:11 UTC by Michael Dyck
Modified: 2007-01-16 17:21 UTC (History)
0 users

See Also:


Attachments

Description Michael Dyck 2005-07-11 07:11:38 UTC
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/
Comment 1 Michael Dyck 2005-07-11 19:15:35 UTC
[Re the (non-)pipelining of SCP, Normalization, and STA...]
    Furthermore, STA is required for some Normalization (4.1.5), so it's
    even more muddled.
Comment 2 Mary Fernandez 2006-02-21 18:53:09 UTC
In 3.2.1, changed text to:

"Static analysis is further divided into four sub-phases.   
Typically, each phase consumes the result of
the previous phase and generates output for the next phase. When
processing query prologs, these phases may be mutually dependent
(See <specref reg="id-query-prolog"/>)."

"Normalization works by recursive application of the
normalization rules over a given expression."

"The formal description of evaluation works by recursive application of
the evaluation rules over a given expression."
Comment 3 Michael Dyck 2006-09-29 05:27:42 UTC
(In reply to comment #2)
> 
> "The formal description of evaluation works by recursive application of
> the evaluation rules over a given expression."

Now that you've removed the reference to "bottom-up application of evaluation rules", it doesn't make any sense to keep the sentence "(Note that in practice some implementations may prefer top-down evaluation strategies.)". Just delete it.
Comment 4 Jerome Simeon 2006-10-19 23:38:09 UTC
Done.
- Jerome