Structure analysis device and program
AssigneesI-System Co., Ltd., Shinichi Ishida, Tsutomu Matsuzaki
InventorShinichi Ishida
Life of this patent
Estimating the term…
Abstract
A structure analysis device comprises a storage means wherein modules are stored, and an analysis means for carrying out a structural analysis of a prescribed subject module of the modules which are stored in the storage means. If a hierarchical structure of a first subject range and a hierarchical structure of a second subject range of the subject module are the same, the analysis means creates similarity notification information in association with the first subject range and/or the second subject range. The first subject range and the second subject range are respectively different subject ranges of the subject ranges of the subject modules which are acquired from the storage means. The similarity notification information denotes that respectively similar subject ranges are present in the subject module.
Claims12
A structure analysis device for performing structure analysis of a module including a plurality of sentences written in a programming language, wherein the plurality of sentences of the module include a plurality of conditional statements, wherein each of the plurality of conditional statements has at least one of an executable-on-satisfaction statement and an executable-on-failure statement, wherein the executable-on-satisfaction statement is one of the plurality of sentences that is executed when a conditional expression of the corresponding conditional statement is satisfied, and the executable-on-failure statement is another one of the plurality of sentences that is executed when the conditional expression is not satisfied, wherein at least one of the plurality of conditional statements has another one of the plurality of conditional statements therewithin as said at least one of the executable-on-satisfaction statement and the executable-on-failure statement so that the plurality of conditional statements form a hierarchization of the plurality of sentences, and wherein the hierarchization forms a specifiable hierarchical structure for each of a plurality of target ranges, each of which includes a series of sentences from among the plurality of sentences in the module;
- the structure analysis device comprising:
- a storage device;
- and
- a CPU which is configured to operate as an analyzing device;
- wherein the storage device stores the module;
- and
- wherein the analyzing device performs the structure analysis of the module stored in the storage device by obtaining the module from the storage device, and when the hierarchical structure of a first one of the plurality of target ranges is the same as the hierarchical structure of a second one of the plurality of target ranges, creating a similarity notifier in association with at least one of the first target range and the second target range, wherein the first target range and the second target range are different from each other from among the plurality of target ranges in the obtained module, and wherein the similarity notifier notifies existence of target ranges similar to each other in the obtained module, and
- wherein the hierarchical structure of each target range is identifiable by using a hierarchy pattern that is a combination of hierarchy levels involved in the target range, wherein each hierarchy level indicates a hierarchy depth with respect to a sentence at a top of the target range.
A structure analysis device for performing structure analysis of a module including a plurality of sentences written in a programming language, wherein the plurality of sentences of the module include a plurality of conditional statements, wherein each of the plurality of conditional statements has at least one of an executable-on-satisfaction statement and an executable-on-failure statement, wherein the executable-on-satisfaction statement is one of the plurality of sentences that is executed when a conditional expression of the corresponding conditional statement is satisfied, and the executable-on-failure statement is another one of the plurality of sentences that is executed when the conditional expression is not satisfied, wherein at least one of the plurality of conditional statements has another one of the plurality of conditional statements therewithin as said at least one of the executable-on-satisfaction statement and the executable-on-failure statement so that the plurality of conditional statements form a hierarchization of the plurality of sentences, and wherein the hierarchization forms a specifiable hierarchical structure for each of a plurality of target ranges, each of which includes a series of sentences from among the plurality of sentences in the module;
- the structure analysis device comprising:
- a storage device, and
- a device body coupled to the storage device;
- wherein the storage device stores the module;
- and
- wherein the device body obtains the module from the storage device and creates, when the hierarchical structure of a first one of the plurality of target ranges is the same as the hierarchical structure of a second one of the plurality of target ranges, a similarity notifier in association with at least one of the first target range and the second target range, wherein the first target range and the second target range are different from each other from among the plurality of target ranges in the obtained module, and wherein the similarity notifier notifies existence of target ranges similar to each other in the obtained module, and
- wherein the hierarchical structure of each target range is identifiable by using a hierarchy pattern that is a combination of hierarchy levels involved in the target range, wherein each hierarchy level indicates a hierarchy depth with respect to a sentence at a top of the target range.
A method for performing structure analysis of a module, the method being performed by a computer system which includes a storage device that stores the module, wherein the module includes a plurality of sentences written in a programming language, wherein the plurality of sentences of the module include a plurality of conditional statements, wherein each of the plurality of conditional statements has at least one of an executable-on-satisfaction statement and an executable-on-failure statement, wherein the executable-on-satisfaction statement is one of the plurality of sentences that is executed when a conditional expression of the corresponding conditional statement is satisfied, and the executable-on-failure statement is another one of the plurality of sentences that is executed when the conditional expression is not satisfied, wherein at least one of the plurality of conditional statements has another one of the plurality of conditional statements therewithin as said at least one of the executable-on-satisfaction statement and the executable-on-failure statement so that the plurality of conditional statements form a hierarchization of the plurality of sentences, and wherein the hierarchization forms a specifiable hierarchical structure for each of a plurality of target ranges, each of which includes a series of sentences from among the plurality of sentences in the module, the method comprising:
- obtaining the module from the storage device;
- and
- creating, when the hierarchical structure of a first one of the plurality of target ranges is the same as the hierarchical structure of a second one of the plurality of target ranges, a similarity notifier in association with at least one of the first target range and the second target range, wherein the first target range and the second target range are different from each other from among the plurality of target ranges in the obtained module, and wherein the similarity notifier notifies existence of target ranges similar to each other in the obtained module, and
- wherein the hierarchical structure of each target range is identifiable by using a hierarchy pattern that is a combination of hierarchy levels involved in the target range, wherein each hierarchy level indicates a hierarchy depth with respect to a sentence at a top of the target range.
A non-transitory computer-readable storage medium having stored thereon a program for performing structure analysis of a module on a computer system including a storage device that stores the module, wherein the module includes a plurality of sentences written in a programming language, wherein the plurality of sentences of the module include a plurality of conditional statements, wherein each of the plurality of conditional statements has at least one of an executable-on-satisfaction statement and an executable-on-failure statement, wherein the executable-on-satisfaction statement is one of the plurality of sentences that is executed when a conditional expression of the corresponding conditional statement is satisfied, and the executable-on-failure statement is another one of the plurality of sentences that is executed when the conditional expression is not satisfied, wherein at least one of the plurality of conditional statements has another one of the plurality of conditional statements therewithin as said at least one of the executable-on-satisfaction statement and the executable-on-failure statement so that the plurality of conditional statements form a hierarchization of the plurality of sentences, and wherein the hierarchization forms a specifiable hierarchical structure for each of a plurality of target ranges, each of which includes a series of sentences from among the plurality of sentences in the module, the program being executable by a processor of the computer system to perform functions comprising:
- obtaining the module from the storage device;
- and
- creating, when the hierarchical structure of a first one of the plurality of target ranges is the same as the hierarchical structure of a second one of the plurality of target ranges, a similarity notifier in association with at least one of the first target range and the second target range, wherein the first target range and the second target range are different from each other from among the plurality of target ranges in the obtained module, and wherein the similarity notifier notifies existence of target ranges similar to each other in the obtained module, and
- wherein the hierarchical structure of each target range is identifiable by using a hierarchy pattern that is a combination of hierarchy levels involved in the target range, wherein each hierarchy level indicates a hierarchy depth with respect to a sentence at a top of the target range.
Dependencies are inferred from the claim text.