System and method for an improved type inference
First Claim
1. A method for calculating an inferred type of a step in a path expression having an input expression followed by the step, the input expression having an associated input expression type with an associated input expression type cardinality, the step having an axis and a node test, the method comprising:
- preserving the input expression type cardinality for calculating the inferred type of the step; and
calculating the inferred type of the step in accordance with the preserved input expression type cardinality, the axis, and the node test.
2 Assignments
0 Petitions
Accused Products
Abstract
An improved type inference may be calculated for a path expression that may be classified into a series of input expressions followed by steps. For each such series, the inference may be calculated based on input including a type for the input expression, an axis for the step, and a node test for the step. The cardinality of the input expression type is preserved for the calculation of the step type. Also, a set of one or more matching node types may be identified within the type repository. These matching node types are node types within the axis of the step that match the node test of the step. These matching node types are identified without calculating the full content type implied by the axis. Avoiding the calculation of the full content type of the axis may reduce the processing time required to perform the inference.
-
Citations
20 Claims
-
1. A method for calculating an inferred type of a step in a path expression having an input expression followed by the step, the input expression having an associated input expression type with an associated input expression type cardinality, the step having an axis and a node test, the method comprising:
-
preserving the input expression type cardinality for calculating the inferred type of the step; and
calculating the inferred type of the step in accordance with the preserved input expression type cardinality, the axis, and the node test. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method for calculating an inferred type of a step in a path expression having an input expression followed by a step, the input expression having an associated input expression type with an associated input expression type cardinality, the step having an axis and a node test, the method comprising:
-
identifying a set of at least one matching node type within a type repository that matches both the axis and the node test for the step without calculating a full content type implied by the axis; and
retrieving a type of each identified matching node from the type repository. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A system for calculating an inferred type of a step in a path expression having an input expression followed by a step, the input expression having an associated input expression type with an associated input expression type cardinality, the step having an axis and a node test, the system comprising:
-
a processor operative to execute computer executable instructions; and
memory having stored therein computer executable instructions for performing the following stages;
preserving the input expression type cardinality for calculating the inferred type of the step; and
calculating the inferred type of the step in accordance with the preserved input expression type cardinality, the axis, and the node test. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification