Estimation of type-cast sets
AssigneeIntel Corporation
InventorsRakesh Ghiya, David C. Sehr
Life of this patent
Estimating the term…
Abstract
An arrangement is provided for estimating type-cast sets of a program. Type-cast sets of a program are computed with respect to the declared types contained in the program.
Claims20
A method, comprising:
- receiving a program;
- estimating type-cast sets of the program, wherein each of the type-cast sets corresponds to a declared type in the program, wherein the estimating type-cast sets further comprises
- initializing type-cast sets for corresponding declared types in the program;
- identifying an assigment statement in the program, wherein the assignment statement includes a left hand side expression and a right hand side expression;
- computing types-represented sets for both the left hand side expression and the right hand side expression of the assignment statement;
- and
- constructing a type-cast set for each element in the types-represented set of the left hand side expression based on the types-represented sets of the left hand side expression and the right hand side expression;
- and
- determining the validity of the program that is being developed with respect to a pre-determined programming style guideline using the type-cast sets computed from the program.
A method for estimating type-cast sets of a program, comprising:
- initializing type-cast sets corresponding to declared types in the program;
- identifying an assigment statement in the program;
- and
- estimating at least one type-cast set corresponding to the assignment statement, wherein said estimating comprises:
- initializing type-cast sets for corresponding declared types in the program;
- identifying an assigment statement in the program, wherein the assignment statement includes a left hand side expression and a right hand side expression;
- computing types-represented sets for both left hand side expression and right hand side expression of the assignment statement;
- and
- constructing a type-cast set for each element in the types-represented set of the left hand side expression based on the types-represented sets of the left hand side expression and the right hand side expression;
- and
- determining the validity of the program that is being developed with respect to a pre-determined programming style guideline using the type-cast sets computed from the program.
A system having processor, comprising:
- a program;
- a type-cast set estimation mechanism for estimating type-cast sets of the program, wherein each of the type-cast sets corresponds to a declared type in the program, wherein the type-cast set estimation mechanism comprises:
- an assignment statement identification mechanism for identifying an assigment statement in the program, wherein the identified assignment statement includes a left hand side expression and a right hand side expression;
- a types-represented set estimation mechanism for computing types-represented sets for both the left hand side expression and the right hand side expression;
- and
- a type-cast set construction mechanism for constructing a type-cast set for each element in the types-represented set of the left hand side expression based on the types-represented sets of the left hand side expression and the right hand side expression;
- and
- an application development tool for evaluating the validity of the program that is being developed with respect to a pre-determined programming style guideline based on the type-cast sets computed from the program.
A system having processor for estimating type-cast sets of a program, comprising:
- an assignment statement identification mechanism capable of identifying an assigment statement in a program, wherein the identified assignment statement includes a left hand side expression and a right hand side expression;
- a types-represented set estimation mechanism capable of computing types-represented sets for both the left hand side expression and the right hand side expression;
- and
- a type-cast set construction mechanism capable of constructing a type-cast set for each element in the types-represented set of the left hand side expression based on the types-represented sets of the left hand side expression and the right hand side expression, wherein the types-represented set estimation mechanism comprises:
- an expression analyzer capable of determining the format of an expression;
- and
- a plurality of types-represented set constructors, each of which is for computing the types-represented set of the expression according to the format of the expression, and
- determining the validity of the program that is being developed with respect to a pre-determined programming style guideline using the type-cast sets computed from the program.
An article comprising a storage medium having stored thereon instructions that, when executed by a machine, result in the following:
- receiving a program;
- estimating type-cast sets of the program, wherein each of the type-cast sets corresponds to a declared type in the program wherein said estimating type-cast sets comprises:
- initializing type-cast sets for corresponding declared types in the program;
- identifying an assigment statement in the program, wherein the assignment statement includes a left hand side expression and a right hand side expression;
- computing types-represented sets for both the left hand side expression and the right hand side expression of the assignment statement;
- and
- constructing a type-cast set for each element in the types-represented set of the left hand side expression based on the types-represented sets of the left hand side expression and the right hand side expression;
- and
- determining the validity of the program that is being developed with respect to a pre-determined programming style guideline using the type-cast sets computed from the program.
An article comprising a storage medium having stored thereon instructions for estimating type-cast sets of a program that, when executed by a machine, result in the following:
- initializing type-cast sets corresponding to the declared types in the program;
- identifying an assigment statement in the program;
- and
- estimating at least one type-cast set corresponding to the assignment statement, wherein said estimating comprises:
- computing types-represented sets for both left hand side expression and right hand side expression of the assignment statement;
- and
- constructing a type-cast set for each element in the types-represented set of the left hand side expression based on the types-represented sets of the left hand side expression and the right hand side expression;
- and
- determining the validity of the program that is being developed with respect to a pre-determined programming style guideline using the type-cast sets computed from the program.
Dependencies are inferred from the claim text.