IP Library Patent Application 11521140
Patent Application
App. No. 11/521,140

Type inference for optimized XSLT implementation

Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US None
App. No.
11/521,140
Abstract

Type inference techniques are provided for use in compiling an Extensible Markup Language Transforms (XSLT) stylesheet into a compiled XSLT processor. Using “variant” storages instead of an appropriate efficient representation is both memory-costly (requires more space) and computationally inefficient (requires runtime type switching during execution of the expression). Type inference may be used to determine what types may be assigned to variables and parameters during execution of an XSLT program.

Claims (38)

1 . A method for performing type inference when compiling an Extensible Markup Language Transforms (XSLT) stylesheet into a compiled XSLT processor, comprising:

generating an Abstract Syntax Tree (AST) from said XSLT stylesheet;

annotating nodes in said AST that are associated with variables and parameters, wherein said annotating comprises associating said nodes with type flags, wherein said type flags record a type of value that may be assigned to said variables and parameters;

building a data-flow graph to detect a type of value of that may be assigned to said variables and parameters;

propagating any type flags through the data-flow graph;

marking variables and parameters as strongly typed if associated with only one type flag;

allocating storage to variables and parameters marked as strongly typed according to a corresponding type flag.

2 . The method of claim 1 , further comprising annotating a local parameter whose default value may be used during execution of said compiled XSLT processor with a “may be default” type flag.

3 . The method of claim 1 , wherein said type flags comprise a string type flag, a number type flag, a node set type flag, and a Boolean type flag.

4 . The method of claim 1 , wherein said type flags comprise a node type flag which indicates a node set containing exactly one node.

5 . The method of claim 1 , wherein said type flags comprise a result tree fragment type flag.

6 . The method of claim 1 , wherein said data-flow graph represents a can-be-assigned-to relation for an xsl:call-template case, an xsl:apply-templates case, and an xsl:apply-imports case.

7 . The method of claim 1 , further comprising eliminating a runtime type checks operation for a parameter that is associated with a node set type flag.

8 . A system for performing type inference when compiling an Extensible Markup Language Transforms (XSLT) stylesheet into a compiled XSLT processor, comprising:

a component for generating an Abstract Syntax Tree (AST) from said XSLT stylesheet;

a component for annotating nodes in said AST that are associated with variables and parameters, wherein said annotating comprises associating said nodes with type flags, wherein said type flags record a type of value that may be assigned to said variables and parameters;

a component for building a data-flow graph to detect a type of value of that may be assigned to said variables and parameters;

a component for propagating any type flags through the data-flow graph;

a component for marking variables and parameters as strongly typed if associated with only one type flag;

a component for allocating storage to variables and parameters marked as strongly typed according to a corresponding type flag.

9 . The system of claim 8 , further comprising a component for annotating a local parameter whose default value may be used during execution of said compiled XSLT processor with a “may be default” type flag.

10 . The system of claim 8 , wherein said type flags comprise a string type flag, a number type flag, a node set type flag, and a Boolean type flag.

11 . The system of claim 8 , wherein said type flags comprise a node type flag which indicates a node set containing exactly one node.

12 . The system of claim 8 , wherein said type flags comprise a result tree fragment type flag.

13 . The system of claim 8 , wherein said data-flow graph represents a can-be-assigned-to relation for an xsl:call-template case, an xsl:apply-templates case, and an xsl:apply-imports case.

14 . The system of claim 8 , further comprising a component for eliminating a runtime type checks operation for a parameter that is associated with a node set type flag.

15 . A computer readable medium bearing instructions for performing type inference when compiling an Extensible Markup Language Transforms (XSLT) stylesheet into a compiled XSLT processor, said instructions comprising:

instructions for generating an Abstract Syntax Tree (AST) from said XSLT stylesheet;

instructions for annotating nodes in said AST that are associated with variables and parameters, wherein said annotating comprises associating said nodes with type flags, wherein said type flags record a type of value that may be assigned to said variables and parameters;

instructions for building a data-flow graph to detect a type of value of that may be assigned to said variables and parameters;

instructions for propagating any type flags through the data-flow graph;

instructions for marking variables and parameters as strongly typed if associated with only one type flag;

instructions for allocating storage to variables and parameters marked as strongly typed according to a corresponding type flag.

16 . The computer readable medium of claim 15 , further comprising instructions for annotating a local parameter whose default value may be used during execution of said compiled XSLT processor with a “may be default” type flag.

17 . The computer readable medium of claim 15 , wherein said type flags comprise a string type flag, a number type flag, a node set type flag, and a Boolean type flag.

18 . The computer readable medium of claim 15 , wherein said type flags comprise a node type flag which indicates a node set containing exactly one node.

19 . The computer readable medium of claim 15 , wherein said type flags comprise a result tree fragment type flag.

20 . The computer readable medium of claim 15 , wherein said data-flow graph represents a can-be-assigned-to relation for an xsl:call-template case, an xsl:apply-templates case, and an xsl:apply-imports case.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034542/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 19, 2006
From: LAPOUNOV, ANTON V.; LAMMEL, RALF; DUBINETS, SERGEY
To: MICROSOFT CORPORATION
Reel/Frame 018413/0726 →