Abnormal pattern detection program for function call in source program

Information

  • Patent Application
  • 20070217679
  • Publication Number
    20070217679
  • Date Filed
    December 21, 2006
    17 years ago
  • Date Published
    September 20, 2007
    16 years ago
Abstract
Disclosed is an abnormal pattern detection program for a function call in a source program that makes a computer, which is connected to a main memory and an output device, execute the following processes. (1) A reading process for reading the source program onto the main memory.(2) A sentence extracting process for extracting previous and next sentences of every function call of each function from the source program read onto the main memory.(3) A setting process for setting common appearance patterns, which are included in the previous and next sentences of every function call extracted through the sentence extracting process and appear in a high frequency, on the main memory.(4) An output process for outputting a warning message from the output device when a function call whose previous and next sentences do not include any of the common appearance patterns is found in the source program.
Description

DESCRIPTION OF THE ACCOMPANYING DRAWINGS


FIG. 1 is a block diagram showing an outline configuration of a computer into which an abnormal pattern detection program for a function call is installed, and



FIG. 2 is a flowchart showing contents of the process executed by a CPU according to an analysis section in the abnormal pattern detection program for a function call.


Claims
  • 1. An abnormal pattern detection program for a function call in a source program that makes a computer, which is connected to a main memory and an output device, execute the following processes in order to detect a description error in previous and next sentences of each function call in a source program, said processes comprising: a reading process for reading said source program onto said main memory;a sentence extracting process for extracting previous and next sentences of every function call of each function from said source program read onto said main memory;a setting process for setting common appearance patterns, which are included in the previous and next sentences of every function call extracted through said sentence extracting process and appear in a high frequency, on said main memory; andan output process for outputting a warning message from said output device when a function call whose previous and next sentences do not include any of said common appearance patterns set in said setting process is found in said source program read onto said main memory.
  • 2. An abnormal pattern detection program for a function call in a source program that makes a computer, which is connected to a main memory and an output device, execute the following processes in order to detect a description error in previous and next sentences of each function call in a source program, said processes comprising: a reading process for reading said source program onto said main memory;a sentence extracting process for extracting previous and next sentences of every function call of each function from said source program read onto said main memory;a pattern extracting process for extracting character-string patterns that are commonly included in the previous and next sentences of a plurality of function calls from the previous and next sentences extracted through said sentence extracting process;a calculating process for calculating appearance frequencies of said character-string patterns extracted through said pattern extracting process;a setting process for setting common appearance patterns on said main memory, character-string patterns whose appearance frequencies calculated through said calculating process are higher than a predetermined threshold value are defined as said common appearance patterns;a search process for searching said source program read onto said main memory for a function call whose previous and next sentences do not include any of said common appearance patterns set through said setting process; andan output process for outputting a warning message from said output device when a function call whose previous and next sentences do not include any of said common appearance patterns is searched through said search process.
  • 3. The abnormal pattern detection program for a function call in a source program according to claim 2, wherein said pattern extracting process, said calculating process, said setting process, said search process and said output process are executed for each of a previous sentence and a next sentence of a function call.
  • 4. The abnormal pattern detection program for a function call in a source program according to claim 2, wherein function calls are extracted from said source program, function call lists are created on said main memory for each function, and previous and next sentences of function calls included in each of said function call lists are extracted in said sentence extracting process.
  • 5. The abnormal pattern detection program for a function call in a source program according to claim 2, wherein a threshold value selected by an operator is used in said setting process.
Priority Claims (1)
Number Date Country Kind
2006-074409 Mar 2006 JP national