Apparatus for analyzing task specification

Information

  • Patent Application
  • 20070234281
  • Publication Number
    20070234281
  • Date Filed
    September 12, 2006
    18 years ago
  • Date Published
    October 04, 2007
    16 years ago
Abstract
When instructions involved in a switching of a task are extracted from a program under analysis, the result is that most instructions are involved in tasks. An instruction which forms part of a program under analysis is displayed together with a value which evaluates the possibility that the instruction is involved in a task. An apparatus for analyzing task specifications comprises a task specification analysis unit for determining whether an input set by an instruction is a constant or a data item depending on another instruction, and calculating a value indicative of the possibility of involvement in a task depending on the type of the instruction as a score, and a task specification analysis result display unit for displaying both the instruction and score, wherein corresponding instructions are displayed such that they can be identified by a specified range of the score.
Description

BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a block diagram generally illustrating the configuration of a system according to one embodiment of the present invention;



FIG. 2 is a flow chart for describing functions of a control unit 109;



FIG. 3 is a flow chart for describing a task specification analysis function at step 202;



FIG. 4 is a flow chart for describing a process for setting initial values in task processing condition information tables at step 304;



FIG. 5 is a flow chart for describing a processing statement score calculation process at step 306;



FIG. 6 is a flow chart for describing a weighting coefficient calculation process at step 502;



FIG. 7 is a flow chart for describing a calculation unit score calculation process at step 504;



FIG. 8 is a flow chart for describing a data item score calculation process at step 708;



FIG. 9 is an ER (Entity-Relation) diagram showing associations among respective tables;



FIG. 10 is an instruction information table for registering a program under analysis on an instruction-by-instruction basis;



FIG. 11 is a data item information table for registering a program under analysis according to data items of individual instructions;



FIG. 12 shows a control dependency information table for managing an instruction number added to an instruction which is a dependence target or a dependence source in control dependence;



FIG. 13 shows a control dependency information table for managing a data item of an individual instruction, an instruction number added to an instruction which is a data dependence source of the data item, and an instruction number added to the instruction;



FIG. 14 shows a processing statement information table for registering a value indicative of the possibility of an instruction which is involved in a switching of a task on an instruction-by-instruction basis;



FIG. 15 shows a data item score table for registering a value indicative of the possibility of a data item which is involved in a switching of a task according to data items of individual instructions;



FIG. 16 shows a data item initial value score table for registering a value indicative of the possibility of a data item which is involved in a task when it is an input and when it is a constant;



FIG. 17 shows a processing content coefficient setting table for registering a value indicative of how much a control dependence target is less likely to be involved in a task as compared with a control dependence source;



FIG. 18 shows a loop error determination table for registering an erroneous state in which no weighting coefficient can be calculated in the weighting coefficient calculation process;



FIG. 19 shows a program under analysis used in an embodiment;



FIG. 20 shows an instruction information table before a task specification analysis function at step 202;



FIG. 21 shows a data item information table before the task specification analysis function at step 202;



FIG. 22 shows a control dependence information table before the task specification analysis function at step 202;



FIG. 23 shows a data dependence information table before the task specification analysis function at step 202;



FIG. 24 shows a loop error determination table before a process for setting initial values for task processing condition information tables at step 304;



FIG. 25 shows a processing content coefficient setting table before the process for setting initial values for task processing condition information tables at step 304;



FIG. 26 shows a data item initial value score setting table before the process for setting initial values for task processing condition information tables at step 304;



FIG. 27 shows a processing statement information table before a processing statement score calculation process at step 306;



FIG. 28 shows a data item score table before the processing statement score calculation process at step 306;



FIG. 29 shows the processing statement information table after the processing statement score calculation process at step 306;



FIG. 30 shows the data item score table after the processing statement score calculation process at step 306;



FIG. 31 shows a menu screen in use for describing functions of the control unit 109;



FIG. 32 shows a screen for accepting an initial value score entered from a user for a data item initial value score setting table, and a processed content coefficient for a processed content coefficient setting table;



FIG. 33 shows a screen for displaying task switching associated frequency information on an instruction-by-instruction basis;



FIG. 34 shows an exemplary task specification analysis result display screen;



FIG. 35 shows another example of a task-related program under analysis;



FIG. 36 shows a processing statement information table after a processed statement score calculation process of the task-related program in FIG. 35;



FIG. 37 shows a processing statement information table after the processing statement score calculation process for program line numbers “1” to “5”; and



FIG. 38 shows the processing statement information table after the processing statement score calculation process for program numbers “1” to “6”.


Claims
  • 1. An apparatus for analyzing task specifications for supporting extraction of an instruction involved in a switching of a task from an inputted program under analysis, said apparatus comprising: a task specification analysis unit which uses:information for identifying whether an instruction of the program under analysis is a control statement or others;information for identifying whether a data item in each instruction is a data item which references a value defined by another instruction, a data item having a value defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant;information on a correspondence of a data dependence source to a data dependence target of a particular data item of each instruction, and information on a correspondence of a control dependence source to a control dependence target of a particular instruction;a value indicative of how much an instruction of a control dependence target is less likely to be involved in a switching of a task as compared with an instruction of a control dependence source; anda value indicative of the possibility of involvement in a switching of a task when a data item is a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant, andoutputs a task specification analysis result comprised of a pair of an instruction and a value indicative of the possibility that the instruction is involved in a switching of a task,wherein when there are a certain first instruction and a different second instruction, the first instruction is a control statement when whether the second instruction should be executed or not is determined by the result of executing the first instruction; orwhen there are a certain first instruction, a different second instruction, and a certain first data item, the first instruction is called a data dependence source of the first data item, and the second instruction is a data dependence target of the first data item when the first instruction defines the first data item, and when the second instruction references the first data item, and when there is no instruction which again defines the first data item while the second instruction is executed from the first instruction on a path on which the second instruction can be executed from the first instruction; orwhen there are a certain first instruction and a different second instruction, the first instruction is called a control dependence source, and the second instruction is a control dependence target when whether the second instruction should be executed or not is determined by the result of executing the first instruction, and there is no instruction which determines whether or not the second instruction should be executed on a executable path from the first instruction to the second instruction.
  • 2. An apparatus for analyzing task specifications for supporting extraction of an instruction involved in a switching of a task from an program under analysis, said apparatus comprising: a task specification analysis unit which uses:information for identifying whether a data item in each instruction is a data item which references a value defined by another instruction, a data item having a value defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant;information on a correspondence of a data dependence source to a data dependence target of a particular data item of each instruction; anda value indicative of the possibility of involvement in a switching of a task when a data item is a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant, andoutputs a task specification analysis result comprised of a pair of an instruction and a value indicative of the possibility that the instruction is involved in a switching of a task.
  • 3. The apparatus for analyzing task specifications according to claim 1, wherein: said task specification analysis unit replaces information indicative of an instruction which constitutes an input is a control statement or others with information indicative of whether an instruction is a control statement of a classification 1, a control statement of classification 2, or others,replaces the value indicative of how much an instruction of a control dependence target is less likely to be involved in a switching of a task as compared with an instruction of a control dependence source, which constitutes an input, with a value indicative of how much the instruction of the control dependence target is less likely to be involved in the switching of the task as compared with the instruction of the control dependence source for each of cases where the instruction of the control dependence source is an instruction of the classification 1 and an instruction of the classification 2, when the instruction of the control dependence source is an instruction of the classification 1 and an instruction of the classification 2, anddoes not replace a value indicative of the possibility that the instruction is involved in the switching of the task, which constitutes an output,where when there are a certain first instruction and a different second instruction, the first instruction is a control statement of the first classification when whether or not the second instruction should be executed only once is determined by the result of executing the first instruction, orwhen the instruction is a control statement, and when the instruction is not a control statement of the classification 1, the instruction is a control statement of the classification 2.
  • 4. The apparatus for analyzing task specifications according to claim 1, wherein: said task specification analysis unit replaces the information for identifying whether a data item in each instruction which constitutes an input is a data item which references a value defined by another instruction, a data item having a value defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant with information for identifying whether a data item in each instruction is a data item which references a value defined by another instruction, a data item having a data defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant, andreplaces the value indicative of the possibility of involvement in a switching of a task when a data item is a data item which sets an input of the program in an instruction associated therewith or a data item which is a constant, which constitutes an input, with a value indicative of the possibility that the data item is involved in a switching of a task when the data item is a data item which sets an input of the program in an instruction associated therewith, and is a data item is a constant, whereby a value indicative of the possibility that the instruction is involved in the switching of the task, which constitutes an output, differs depending on whether the data item is an input or is not an input.
  • 5. The apparatus for analyzing task specifications according to claim 2, wherein: said task specification analysis unit replaces the information for identifying whether a data item in each instruction which constitutes an input is a data item which references a value defined by another instruction, a data item having a value defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant with information for identifying whether a data item in each instruction is a data item which references a value defined by another instruction, a data item having a data defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant, andreplaces the value indicative of the possibility of involvement in a switching of a task when a data item is a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant, which constitutes an input, with a value indicative of the possibility that the data item is involved in a switching of a task when the data item is a data item which sets an input of the program in an instruction associated therewith, and is a data item is a constant, whereby a value indicative of the possibility that the instruction is involved in the switching of the task, which constitutes an output, differs depending on whether the data item is an input or is not an input.
  • 6. The apparatus for analyzing task specifications according to claim 1, wherein: said apparatus for analyzing task specifications further comprises a program analysis unit for receiving a program specified by a user to output information indicative of information for identifying whether an instruction of the program is a control statement or others, information for identifying whether a data item in each instruction is a data item which references a value defined by another instruction, a data item having a value defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant, information on a correspondence of a data dependence source to a data dependence target of a particular data item of each instruction, and information on a correspondence of a control dependence source to a control dependence target of a particular instruction.
  • 7. The apparatus for analyzing task specifications according to claim 2, wherein: said apparatus for analyzing task specifications further comprises a program analysis unit for receiving a program specified by a user to output information indicative of information for identifying whether an instruction of the program is a control statement or others, information for identifying whether a data item in each instruction is a data item which references a value defined by another instruction, a data item having a value defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant, information on a correspondence of a data dependence source to a data dependence target of a particular data item of each instruction, and information on a correspondence of a control dependence source to a control dependence target of a particular instruction.
  • 8. The apparatus for analyzing task specifications according to claim 1, wherein: said apparatus for analyzing task specifications further comprises a program analysis unit for receiving a program specified by a user to output information indicative of whether an instruction is a control statement of a classification 1, a control statement of classification 2, or others, a value indicative of how much the instruction of the control dependence target is less likely to be involved in the switching of the task as compared with the instruction of the control dependence source for each of cases where the instruction of the control dependence source is an instruction of the classification 1 and an instruction of the classification 2, when the instruction of the control dependence source is an instruction of the classification 1 and an instruction of the classification 2, information on a correspondence of a data dependence source to a data dependence target of a particular data item of each instruction, and information on a correspondence of a control dependence source to a control dependence target of a particular instruction.
  • 9. The apparatus for analyzing task specifications according to claim 4, wherein: said apparatus for analyzing task specifications further comprises a program analysis unit for receiving a program specified by a user to output information indicative of information for identifying whether an instruction of the program is a control statement or others, information for identifying whether a data item in each instruction is a data item which references a value defined by another instruction, a data item having a value defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant, information on a correspondence of a data dependence source to a data dependence target of a particular data item of each instruction, and information on a correspondence of a control dependence source to a control dependence target of a particular instruction.
  • 10. The apparatus for analyzing task specifications according to claim 5, wherein: said apparatus for analyzing task specifications further comprises a program analysis unit for receiving a program specified by a user to output information for identifying whether a data item in each instruction is a data item which references a value defined by another instruction, a data item having a value defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant, information on a correspondence of a data dependence source to a data dependence target of a particular data item of each instruction, and information on a correspondence of a control dependence source to a control dependence target of a particular instruction.
  • 11. An apparatus for supporting extraction of an instruction which is likely to be involved in a switching of a task from a program specified by a user, wherein: said apparatus receives a program specified by a user, and a value indicative of the possibility that a data item is involved in a switching of a task when the data item is a data item which sets an input of the program in an instruction associated therewith, andoutputs a task specification analysis result comprised of an instruction, and a value indicative of the possibility that the instruction is involved in a switching of a task.
  • 12. An apparatus for supporting extraction of an instruction which is likely to be involved in a switching of a task from a program specified by a user, wherein: said apparatus receives a program specified by a user, a value indicative of how much an instruction of a control dependence target is less likely to be involved in a switching of a task as compared with an instruction of a control dependence source and a value indicative of the possibility that a data item is involved in a switching of a task when the data item is a data item which sets an input of the program in an instruction associated therewith, andoutputs a task specification analysis result comprised of an instruction, and a value indicative of the possibility that the instruction is involved in a switching of a task.
  • 13. The apparatus for analyzing task specifications according to claim 1, wherein: a task processing condition extraction unit further comprising a task specification analysis result display unit for receiving a task specification analysis result comprised of an instruction, and a value indicative of the possibility that the instruction is involved in a switching of a task to display a correspondence of the instruction to the value indicative of the possibility that the instruction is involved in the switching of the task.
  • 14. The apparatus for analyzing task specifications according to claim 1, wherein: a task processing condition extraction unit further comprising a task specification analysis result display unit for receiving a task specification analysis result comprised of an instruction, and a value indicative of the possibility that the instruction is involved in a switching of a task to display instructions in an order in which the instructions presents higher values indicative of the possibility of the involvement in the switching of the task.
  • 15. The apparatus for analyzing task specifications according to claim 1, wherein: a task processing condition extraction unit further comprising a task specification analysis result display unit for receiving a task specification analysis result comprised of an instruction, and a value indicative of the possibility that the instruction is involved in a switching of a task to display instructions which has a certain value or more of the possibility that the instructions are involved in a switching of a task.
  • 16. The apparatus for analyzing task specifications according to claim 1, wherein: a task processing condition extraction unit further comprising a task specification analysis result display unit for receiving a task specification analysis result comprised of an instruction, and a value indicative of the possibility that the instruction is involved in a switching of a task to display a correspondence of an instruction which is a control statement to the value indicative of the possibility that the instruction is involved in the switching of the task.
  • 17. An apparatus for analyzing task specifications for supporting extraction of an instruction involved in a switching of a task from a program under analysis, comprising a first memory for storing an analysis processing program, a second memory for storing the program under analysis and table information for use in an analysis process, an input device, an output device, and a processing unit for executing the analysis process to analyze the program under analysis, wherein said analysis processing program comprises:a program analysis process for reading the program under analysis and retrieving information (a), (b), (c), (d) for use in an analysis of specifications;a task specification analysis process for receiving values (e), (f) from the input device to find a value which depends on a switching of a task for a processing statement which forms part of the program under analysis using the information (a), (b), (c), (d); anda task specification analysis result display process for displaying a combination of the processing statement which forms part of the program under analysis with the value which depends on the switching of the task on the output means,wherein said information (a) is information for identifying whether an instruction which forms part of the program under analysis is a control statement or another;said information (b) is information for identifying whether a data item in each instruction which forms part of the program under analysis is a data item which references a value defined by another instruction, a data item having a value defined by the instruction, a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant;said information (c) is information on a correspondence of a data dependence source to a data dependence target of a particular data item of each instruction;said information (d) is information on a correspondence of a control dependence source to a control dependence target of a particular instruction;said value (e) is a value indicative of how much an instruction of a control dependence target is less likely to be involved in a switching of a task as compared with an instruction of a control dependence source; andsaid value (f) is a value indicative of the possibility of involvement in a switching of a task when a data item is a data item which sets an input of the program in an instruction associated therewith, or a data item which is a constant,
  • 18. The apparatus for analyzing task specifications according to claim 17, wherein: said task specification analysis process finds a weighting coefficient and a calculation unit score for a processing statement which forms part of the program under analysis; andthe product of the weighting coefficient and the calculation unit score is a value which depends on the switching of the task.
  • 19. The apparatus for analyzing task specifications according to claim 17, wherein said value (e) is a value equal to or less than one.
  • 20. The apparatus for analyzing task specifications according to claim 17, wherein said value (f) is a value equal to or more than one when a data item sets an input of a program in an instruction associated therewith.
  • 21. The apparatus for analyzing task specifications according to claim 18, wherein a constant is set to said weighting coefficient when there is no control dependence source program line of the processing statement which is being processed.
Priority Claims (1)
Number Date Country Kind
2006-086862 Mar 2006 JP national