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 1699 - [FS] algebra of sequence concatenation is not complete
Summary: [FS] algebra of sequence concatenation is not complete
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows 2000
: 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-17 23:09 UTC by Fred Zemke
Modified: 2005-09-06 13:06 UTC (History)
0 users

See Also:


Attachments

Description Fred Zemke 2005-07-17 23:09:28 UTC
4.3.1 Constructing sequences
The rule under dynamic evaluation presumes that the algebra of
sequences under concatenation is known, but the purpose of the
Formal Semantics is to explain semantics, not presume semantics.
I think you need the following rule in addition to the stated one:

dynEnv |- Value = (A1, ... An), (B1, ... Bm)
---------------------------------------------
dynEnv |- Value = (A1, ..., An, B1, ... Bm)

Or perhaps it can be done by rewording your existing rule as
follows:

dynEnv |- Expr1 => (A1, ... An)
dynEnv |- Expr2 => (B1, ... Bm)
-------------------------------
dynEnv |- Expr1, Expr2 => (A1, ..., An, B1, ..., Bm)

This includes as a special case the following:

dynEnv |- Value1 = ()
dynEnv |- Value2 = (B1, ... Bm)
-------------------------------
dynEnv |- Value1, Value2 = Value2

dynEnv |- Value1 = (A1, ... An)
dynEnv |- value2 = ()
-------------------------------
dynEnv |- Value1, Value2 = Value2
Comment 1 Jerome Simeon 2005-07-21 19:05:20 UTC
I think having a binary rule for the sequence construction is probably better.

The way sequences of values behave is described in [XQuery 3.3 Sequence
Expressions] and [Data Model 2.5 Sequences].

Those rules are recalled in [Formal Semantics 2.3.1 Formal values] (second
paragraph from the end of the section). We may want to add a pointer to the data
model there for clarification.

We may want to formalize those rules on sequences by adding something along the
lines that you propose. I believe the following would be a bit cleaner, and more
complete as well. But I am not completely convinced this is necessary.


  ---------------
  (Value) = Value


  -------------------
  (), Value2 = Value2


  -------------------
  Value1, () = Value1

- Jerome
Comment 2 Michael Rys 2005-07-26 15:41:06 UTC
The working groups have decided to add the additional pointer in 2.3.1, 
however we are not going to add additional rules since these rules are 
considered part of the data model sequence behaviour.

Please close the issue if you agree with the resolution or reopen the issue if 
you disagree.