W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2014

[Bug 24569] New: Least common types and lattices

From: <bugzilla@jessica.w3.org>
Date: Thu, 06 Feb 2014 21:34:58 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-24569-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24569

            Bug ID: 24569
           Summary: Least common types and lattices
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: cmsmcq@blackmesatech.com
        QA Contact: public-qt-comments@w3.org

In section 19.2 [1], XSLT 3.0 says that two items do not necessarily have a
unique  least common type, because item types form a lattice, not a hierarchy:

  In some cases the above entries require computation of the least 
  common type of two types T and U. Since item types form a lattice 
  rather than a hierarchy, there may be a set of types V such that 
  T and U are both subtypes of every type in V, and no type in V 
  is unambiguously the "least" common type in the sense that all 
  the others are subtypes of it. In this situation the choice of 
  which type in V to use as the inferred static type is 
  implementation-defined.

[1] http://www.w3.org/TR/xslt-30/#determining-static-type

I believe that in a lattice, any two points have a unique least upper bound or
join -- if they don't, one is not dealing with a lattice.

The claim that itemtypes form a lattice is also found in XDM [2].

[2] http://www.w3.org/TR/xpath-datamodel-30/#types-hierarchy

If any two types do in fact have a least common type, then the paragraph quoted
above from section 19.2 should probably go away; if we do have pairs of types
that lack a unique least common type, then the claim that our types form a
lattice should be dropped from both specs and any other spec that makes it.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 6 February 2014 21:35:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:45 UTC