<?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>1580</bug_id>
          
          <creation_ts>2005-07-14 04:12:36 +0000</creation_ts>
          <short_desc>[FS] technical: 4.1.5 Function Calls: complicated by pseudo-functions</short_desc>
          <delta_ts>2006-10-20 00:00:40 +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>All</rep_platform>
          <op_sys>All</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="Michael Dyck">jmdyck</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>4554</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-14 04:12:36 +0000</bug_when>
    <thetext>4.1.5 Function Calls

&quot;Otherwise, the function signatures matching the function name and arity
are retrieved from the static environment.&quot;
    The XQuery and XPath specs both state:
        &quot;Each function is uniquely identified by its expanded QName
        and its arity (number of parameters).&quot;
    So am I correct in thinking that there would be *multiple* signatures
    only in the cases of the &quot;arithmetic operator pseudo-functions&quot; and
    the &quot;comparison pseudo-functions&quot;?

    Is it also true that the &quot;union of atomic types&quot; exceptions in the STA
    are only relevant to the pseudo-functions? (I.e., for any other call,
    you&apos;d get the same result if those exceptions weren&apos;t there.)

    If so, then details that are only pertinent to pseudo-functions are
    being allowed to complicate the normal case. Why? It seems to me that
    this section would be much improved by banishing those details to B.2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5069</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-21 04:25:09 +0000</bug_when>
    <thetext>More explicitly:

    statEnv.funcType:
        This should map an (expanded-QName,arity) pair to a single
        function signature. Change the rules in 4.1.5 appropriately.
        For the &quot;pseudo-functions&quot;, supply a suitably general signature
        (although it doesn&apos;t really matter since they have special STA
        rules anyhow).

    4.1.5 / STA / rule 2:
        Indicate that &apos;expanded-QName&apos; is that of a pseudo-function.
        Move the resulting rule to B.2.

    4.1.5 / STA / rule 3:
        Remove the &apos;not&apos; premises.

    B.2
        Add these rules:

            [expanded-Qname is that of a binary pseudo-function]
            Type1 is not a union of atomic types
            Type2 is not a union of atomic types
            statEnv |- Type1 can be promoted to Type1&apos;
            statEnv |- Type2 can be promoted to Type2&apos;
            operator type for Type1&apos; and Type2&apos; is Type3&apos;
            --------------
            statEnv |- expanded-QName(Type1, Type2) : Type3&apos;

            [expanded-Qname is that of a unary pseudo-function]
            Type1 is not a union of atomic types
            statEnv |- Type1 can be promoted to Type1&apos;
            operator type for Type1&apos; is Type3&apos;
            --------------
            statEnv |- expanded-QName(Type1) : Type3&apos;

        Rewrite the existing B.2 / STA as instances of
            statEnv |- expanded-QName(Type1, ...) : Type
        instead of
            statEnv |- QName(Expr1, ...) : Type
        (See Bug 1755.)

        Clarify the interaction/relationship between the rules handling
        promotion and the rules handling optionality.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5251</commentid>
    <comment_count>2</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2005-07-27 15:14:52 +0000</bug_when>
    <thetext>
We think this is a good suggestion and we should accept the comment
and fix typing rules as suggested. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5261</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2005-07-28 02:22:03 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; 
&gt;     statEnv.funcType:
&gt;         This should map an (expanded-QName,arity) pair to a single
&gt;         function signature.

Similarly, the domain of dynEnv.funcDefn should be changed to
(expanded-QName,arity).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5605</commentid>
    <comment_count>4</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2005-08-31 15:23:52 +0000</bug_when>
    <thetext>The XML Query and XLST WGs have accepted the comment and the suggested fix.
- Jerome</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9622</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2006-05-09 05:55:50 +0000</bug_when>
    <thetext>In the CR, B.2 / STA / rule (2|3|4|5|6|7) went from
    QName(Expr1,...)
to
    expanded-QName(Expr1,...)
but not to
    expanded-QName(Type1,...)
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9710</commentid>
    <comment_count>6</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-05-09 15:07:04 +0000</bug_when>
    <thetext>The comment was not implemented properly in B.2. Fixed the corresponding rules to use the expanded-QName(Type1,...) form.
- Jerome
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>