]> matita.cs.unibo.it Git - helm.git/commitdiff
Performance improvements using the sort attribute
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 18 Dec 2000 18:37:08 +0000 (18:37 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 18 Dec 2000 18:37:08 +0000 (18:37 +0000)
helm/style/content.xsl
helm/style/proofs.xsl

index d36e0152aef666a62880876ec6f8b02d043dbaa1..e71ba3fe16d9a39dfb8528105d18713667170a7a 100644 (file)
@@ -116,7 +116,7 @@ Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
       <m:csymbol>letin</m:csymbol>
       <!-- <xsl:for-each select="*[boolean(key('typeid',@id))]"> -->
       <!-- first process all subproofs (let-in) -->
-      <xsl:for-each select="*[@id = (//InnerTypes/TYPE/@of)]">
+      <xsl:for-each select="*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')]">
        <m:apply>
         <m:csymbol>let</m:csymbol>
         <m:ci><xsl:call-template name="insert_subscript"><xsl:with-param name="node_value"><xsl:value-of select="concat('h',position())"/></xsl:with-param></xsl:call-template></m:ci>
index ba45ee0dc898c62d4ff58df40c748e2609dae572..426e161290e850fb092c82244669671f1dddf68f 100644 (file)
@@ -98,7 +98,8 @@
       <xsl:apply-templates mode="pure" select="*[6]"/>
      </m:apply>
     </xsl:when>
-    <xsl:when test="count(*[@id = //InnerTypes/TYPE/@of]) = 1">
+    <!-- <xsl:when test="count(*[@id = //InnerTypes/TYPE/@of]) = 1"> -->
+    <xsl:when test="count(*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')]) = 1">
      <m:apply helm:xref="{@id}">
       <m:csymbol>thread</m:csymbol>
       <xsl:apply-templates mode="pure" select="//InnerTypes/TYPE[@of=$id]/*"/>
        <m:csymbol>app</m:csymbol>
        <xsl:apply-templates mode="copy-of-no-prop" select="*[1]"/>
       </m:apply>
-      <xsl:apply-templates mode="thread" select="*[@id = //InnerTypes/TYPE/@of]"/>
+      <xsl:apply-templates mode="thread" select="*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')]"/>
      </m:apply>
     </xsl:when>
     <xsl:otherwise>
 
 <xsl:template match="*" mode="copy-of-no-prop">
  <xsl:choose>
-  <xsl:when test="@id = //InnerTypes/TYPE/@of">
+  <!-- <xsl:when test="@id = //InnerTypes/TYPE/@of"> -->
+  <xsl:when test="@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')">
    <m:ci>previous</m:ci>
   </xsl:when>
   <xsl:otherwise>
          <m:csymbol>app</m:csymbol>
          <xsl:apply-templates mode="copy-of-no-prop" select="*[1]"/>
         </m:apply>
-        <xsl:apply-templates mode="thread" select="*[@id = //InnerTypes/TYPE/@of]"/>
+        <!-- <xsl:apply-templates mode="thread" select="*[@id = //InnerTypes/TYPE/@of]"/> -->
+        <xsl:apply-templates mode="thread" select="*[@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')]"/>
        </m:apply>
    </xsl:when>
    <xsl:otherwise>
       <xsl:variable name="id" select="@id"/>
       <xsl:variable name="ideqp" select="*[7]/@id"/>
       <xsl:variable name="idsubp" select="*[5]/@id"/>
+<!--
       <xsl:variable name="leteqp" select="boolean(//InnerTypes/TYPE[@of=$ideqp])"/>
       <xsl:variable name="letsubp" select="boolean(//InnerTypes/TYPE[@of=$idsubp])"/>
+-->
+      <xsl:variable name="leteqp" select="boolean(*[7][@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')])"/>
+      <xsl:variable name="letsubp" select="boolean(*[5][@sort='Prop' and (name(.)='LAMBDA' or name(.)='LETIN' or name(.)='APPLY' or name(.)='MUTCASE' or name(.)='FIX' or name(.)='COFIX')])"/>
       <m:apply helm:xref="{@id}">
        <m:csymbol>rewrite_and_apply</m:csymbol>
        <m:apply>