Method to find a violation of a coding rule in program
AssigneeInternational Business Machines Corporation
InventorsGoh Kondoh, Shinichi Hirose
Life of this patent
Estimating the term…
Abstract
An apparatus for determining whether or not a program violates a convention, including an input unit for receiving an input of a target program to be an object of a determination on whether to violate the convention; a violation storing unit for beforehand storing any one of an abstract syntax tree and a pattern which indicate a structure of a program violating the convention; a converter for converting the abstract syntax tree of the target program to a conversion tree with a predetermined conversion rule; and a determination unit for determining that the target program violates the convention on condition that at least a part of the conversion tree agrees with an abstract syntax tree violating the convention.
Claims14
An apparatus for determining whether or not a program violates a convention, the apparatus comprising:
- an input unit for receiving an input of a target program to be an object of a determination on whether to violate the convention;
- a violation storing unit for beforehand storing violation information indicating a structure of a program violating the convention;
- a converter for converting an abstract syntax tree of the target program to a conversion tree with a predetermined conversion rule;
- and
- a determination unit for determining that the target program violates the convention on condition that at least a part of a structure of the conversion tree agrees with the violation information.
A determination program causing an information processing system to function as an apparatus for determining whether or not a program violates a convention, the determination program causing the information processing system to function as:
- an input unit for receiving an input of a target program to be an object of a determination on whether to violate the convention;
- a violation storing unit for beforehand storing violation information indicating a structure of a program violating the convention;
- a converter for converting an abstract syntax tree of the target program to a conversion tree with a predetermined conversion rule;
- and
- a determination unit for determining that the target program violates the convention on condition that at least a part of a structure of the conversion tree agrees with the violation information.
A method of determining that a program violates a convention, the method comprising:
- receiving an input of a target program to be an object of a determination on whether to violate the convention;
- beforehand storing violation information indicating a structure of a program violating the convention;
- converting an abstract syntax tree of the target program to a conversion tree with a predetermined conversion rule;
- and
- determining that the target program violates the convention on condition that at least a part of a structure of the conversion tree agrees with the violation information.
Dependencies are inferred from the claim text.