<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>1621</bug_id>
          
          <creation_ts>2005-07-15 01:13:02 +0000</creation_ts>
          <short_desc>no algebra of types</short_desc>
          <delta_ts>2005-09-06 13:03:41 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Formal Semantics 1.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 2000</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fred Zemke">fred.zemke</reporter>
          <assigned_to name="Jerome Simeon">simeon</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4697</commentid>
    <comment_count>0</comment_count>
    <who name="Fred Zemke">fred.zemke</who>
    <bug_when>2005-07-15 01:13:02 +0000</bug_when>
    <thetext>.4.3 Content models
There are no inferences for the algebra of types.  For example,
you state that (Type | none) = Type, but I don&apos;t see any 
inferences to back this up.

Some other inferences to consider are:

|- (Type1 | Type2) = (Type2 | Type1)
|- (Type1 | Type1) = (Type1)
|- (Type1 | (Type2 | Type3)) = ((Type1 | Type2) | Type3)

Those are commutative, idempotent and associate rules, respectively.
The &amp; operator is also commutative, idempotent and associative.

I believe that empty (and maybe none) is also an identity for &amp;:

|- (Type &amp; empty) = Type

Are there any rules relating | and &amp;; relating | and , ;
relating , and &amp; ?

Turning to quantifiers, I think we need the following inferences:

|- Type1** = Type1*
|- Type1?* = Type1*
|- Type1++ = Type1+
|- Type1?? = Type1?
etc.

Such rules might be placed in section 8.1, &quot;Judgments for 
accessing types&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4929</commentid>
    <comment_count>1</comment_count>
    <who name="Fred Zemke">fred.zemke</who>
    <bug_when>2005-07-19 21:15:44 +0000</bug_when>
    <thetext>This comment was on section 2.4.3, &quot;Content models&quot;.

Subsequently, I have found 8.3.2 &quot;Subtype and type equality&quot;,
which does consider the algebra of types.  The solution there, to use known 
algorithms for regular expressions and finite state automata, looks correct
and is actually algorithmic, unlike my proposal to specify the axioms from
which a type algebra could be deduced.  (How uncharacteristic of the 
Formal Semantics to actually suggest an algorithm to use to implement
it!)  I now suggest that this comment could be resolved by:

1. Putting a pointer from 2.4.3 to 8.3.2 so the reader knows where to find
a discussion of the algebra of types.

2. Perhaps a note or example in 8.3.2 that all the expected judgments about 
the type hierarcy, such as |- (Type1, empty) = Type1, can be deduced using
the regular expressions algorithms.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4955</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Cotton">pcotton</who>
    <bug_when>2005-07-20 00:02:20 +0000</bug_when>
    <thetext>Thank you for suggesting a solution to your own comment.

The XSL/XQuery WGs agreed to adopt your proposed solution to this comment.

Please let us know if this response is satisfactory. If not, please respond to 
this message, explaining your concerns.

Paul Cotton
On behalf of the XML Query and XSL WGs
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>