WO2010097854A2 - ソフトウェア開発支援ツール - Google Patents

ソフトウェア開発支援ツール Download PDF

Info

Publication number
WO2010097854A2
WO2010097854A2 PCT/JP2009/005161 JP2009005161W WO2010097854A2 WO 2010097854 A2 WO2010097854 A2 WO 2010097854A2 JP 2009005161 W JP2009005161 W JP 2009005161W WO 2010097854 A2 WO2010097854 A2 WO 2010097854A2
Authority
WO
WIPO (PCT)
Prior art keywords
source code
information
software model
software
design intention
Prior art date
Application number
PCT/JP2009/005161
Other languages
English (en)
French (fr)
Inventor
藤原寛
Original Assignee
パナソニック株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by パナソニック株式会社 filed Critical パナソニック株式会社
Priority to CN2009801574922A priority Critical patent/CN102334095A/zh
Publication of WO2010097854A2 publication Critical patent/WO2010097854A2/ja
Priority to US13/183,026 priority patent/US20110271246A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/74Reverse engineering; Extracting design information from source code

Definitions

  • the present invention relates to a tool that supports a software development technique by generating a software model from source code.
  • Patent Document 1 As a software development support tool by generating a software model from a conventional source code, one that can automatically generate a program configuration diagram from an actual source program is known (see Patent Document 1).
  • an object of the present invention is to automatically generate a software model including a design intention of a developer from existing source code and easily realize a software design method centered on the software model.
  • the software development support tool of the present invention includes a software model reading unit that outputs, as software model information, information necessary for automatic generation of source code with a software model described by a developer as an input. And the software model information and the software model design intention extraction rule information describing the rules for extracting the design intention of the developer described in the software model as input.
  • a software model design intention extraction unit that extracts and outputs as software model design intention information, and source code that describes the software model information, the software model design intention information, and rules for generating source code from the software model
  • a source code generation unit that outputs source code as input to the generation rule information, a source code reading unit that outputs information necessary for automatic generation of a software model as input from the source code, and the source code information
  • the source code design intent information is extracted by extracting the source code design intent extraction rule information describing the rules for extracting the design intent of the developer described in the source code as input.
  • a software model is output by inputting the source code design intention extraction unit that outputs the data, the source code information, the source code design intention information, and software model generation rule information that describes rules for generating a software model from the source code.
  • Software model generation A rule database unit that stores and manages the software model generation rule information, the software model design intention extraction rule information, the source code generation rule information, and the source code design intention extraction rule information in a database, and the rule database
  • a database update management unit for managing the content update of the unit, the software model information, the software model generation rule information, the software model design intention extraction rule information, the software model design intention information, the source code information, and the source code generation Using the rule information, the source code design intention extraction rule information, and the source code design intention information as inputs, the software model generation rule information, the software model design intention extraction rule information, and the source code
  • a rule improvement unit for instructing the database update management unit to modify the code generation rule information and the source code design intent extraction rule information to reflect the intention of the developer.
  • a software model including a developer's design intent can be automatically generated from existing source code, and a software design method centered on the software model can be easily realized.
  • the design starts with an abstract software model, the developer modifies the generated initial generation source code, A more specific software model can be easily developed by generating a software model and repeating the synthesis with the abstract software model.
  • a software design method centered on a software model can be easily realized.
  • FIG. 1 is a configuration diagram of a software development support tool according to the embodiment of the present invention.
  • reference numeral 101 denotes a software development support tool in the embodiment of the present invention.
  • the software model reading unit 102 receives the initial software model 115 or the generated software model 116 created by the developer 131, and converts the description of the graphical software model into data that can be easily processed by a computer.
  • the initial software model information 121 or the generated software model information 122 is output.
  • the software model design intention extraction unit 103 receives initial software model information 121 or generated software model information 122 and software model design intention extraction rule information 124 storing rules for extracting a developer's design intention included in the software model.
  • the source code generation unit 104 receives the initial software model information 121, the software model design intention information 123, and the source code generation rule information 125 storing rules for generating the source code, and corresponds to the initial software model 115.
  • the regenerated source code 118 corresponding to the initial generated source code 117 or the generated software model 116 is output.
  • the rule database unit 105 includes a software model generation rule database 106 that is a database that stores rules for generating a software model from source code, and a source code that is a database that stores rules for generating source code from a software model.
  • a generation rule database 109 a software model design intention extraction rule database 107 that is a database storing rules for extracting a developer's design intention included in the software model, and a developer's design intention included in the source code
  • a source code design intention extraction rule database 108 which is a database storing rules for performing the above.
  • the rule improvement unit 111 includes initial software model information 121, generated software model information 122, software model design intention information 123, software model design intention extraction rule information 124, source code generation rule information 125, modified source code information 129, and regenerated source. Modifying the contents of the four types of databases 106 to 109 in the rule database unit 105 with the code information 128, the software model generation rule information 127, the source code design intention extraction rule information 126, and the source code design intention information 130 as inputs. Thus, the conversion from the software model to the source code and the conversion from the source code to the software model are improved to those more suitable for the developer.
  • the database update management unit 110 instructs the rule database unit 105 to modify the database in response to an instruction from the rule improvement unit 111.
  • the source code reading unit 112 receives the manually modified source code 120 created or modified by the developer 119, converts it into data that can be easily processed by a computer, and outputs it as regenerated source code information 128 or modified source code information 129.
  • the source code design intention extraction unit 113 stores the modified source code information 129 or the regenerated source code information 128 and source code design intention extraction rule information 126 storing rules for extracting the design intention of the developer included in the source code.
  • source code design intention information 130 which is design intention data included in the source code, is output.
  • the software model generation unit 114 receives the modified source code information 129 or the regenerated source code information 128, the source code design intention information 130, and the software model generation rule information 127 that stores rules for generating a software model.
  • the generated software model 116 corresponding to the manually modified source code 120 or the regenerated source code 118 is output.
  • FIG. 2 shows a processing flow of the software model reading unit 102.
  • the software model reading unit 102 receives the initial software model 115 or the generated software model 116 created by the developer 131 and converts the description of the graphical software model into data that can be easily processed by a computer.
  • a process of outputting the generated software model information 122 is performed.
  • the initial software model 115 or the generated software model 116 described by the developer 131 is read (201).
  • the element ID is set to 0 (202).
  • repetition is started for all the description elements described in the software model (203).
  • the value of the element ID is increased by 1 (204).
  • the description content of the description element is analyzed in order to output the software model information (205).
  • the analysis result in step 205 is output as initial software model information 121 or generated software model information 122 (206).
  • Step 207 indicates the end position of the repetition process of step 203.
  • FIG. 3 shows a processing flow of the description content analysis subroutine of the description element called at step 205 in the processing flow of the software model reading unit 102 of FIG.
  • the stereotype of the description element currently processed is read (301).
  • the name label of the description element currently processed is read (302).
  • the description position of the description element currently being processed is determined (303).
  • other description elements connected to the description element to be processed are scanned (304).
  • FIG. 4 shows a processing flow of a description position determination subroutine called in step 303 from the description content analysis subroutine of the description element of FIG.
  • the description position in the vertical direction of the description position determination target element is (401). If it is described at a position higher than 1/3, the description position in the left-right direction is further determined (402). If it is written on the left side in the horizontal direction 1/3 or more, the position is set to “upper left part” (404). If it is described in the center, the position is set to “upper center” (405). If it is described on the right side of 1/3 or more in the left-right direction, the position is set to “upper right part” (406).
  • the description position in the left-right direction is further determined (403). If it is described on the left side in the horizontal direction 1/3 or more, the position is set to “lower left part” (407). If it is described in the center, the position is set to “lower center” (408). If it is described on the right side of 1/3 or more in the left-right direction, the position is set to “lower right part” (409). If it is not described at the position of 1/3 or more in the vertical direction in the determination of step 401, the description position in the horizontal direction is further determined (410). If it is described on the left side in the horizontal direction 1/3 or more, the position is set to “center left” (411). If it is described in the center, the position is set to “center” (412). If it is described on the right side in the horizontal direction 1/3 or more, the position is set to “center right part” (413).
  • FIG. 5 shows a processing flow of a connection element scanning subroutine called in step 304 from the description content analysis subroutine of the description element of FIG.
  • the element ID in the connection destination list is set to 0 (501).
  • the connection direction in the connection destination list is set to “none” (502).
  • the element ID in the connected list is set to 0 (503).
  • the connection direction in the connection destination list is set to “none” (504).
  • it is determined whether or not there is a connection to the description element currently being processed (505). Exit if there is no connection. If there is a connection, the repetition is started for all connections (506). Next, it is determined in which direction the connection line is connected (507).
  • connection destination element ID is added to the element ID in the connection destination element list (508).
  • the position of the connection line connection side is added in the connection direction in the connection destination element list (509).
  • the connection source element ID is added to the element ID in the connected element list (510).
  • the position of the connection line connection side is added to the connection direction in the connected element list (511).
  • Step 512 indicates the end position of the iterative process of step 506.
  • FIG. 6 shows a processing flow of the source code generation unit 104.
  • the source code generation unit 104 receives the initial software model information 121 or the generated software model information 122, the software model design intention information 123, and the source code generation rule information 125 that stores rules for generating the source code.
  • a process of outputting the initial generation source code 117 corresponding to the software model 115 or the regeneration source code 118 corresponding to the generation software model 116 is performed.
  • the initial software model information 121 or the generated software model information 122 is read (601).
  • the software model design intention information 123 is read (602).
  • the source code generation rule information 125 is read (603).
  • repetition is started for all element IDs included in the initial software model information 121 or the generated software model information 122 (604).
  • the code generation rule ID corresponding to the current element ID is read from the software model design intention information 123 (605).
  • the design intention ID corresponding to the current element ID is read from the software model design intention information 123 (606).
  • a generated code template corresponding to the code generation rule ID and the design intention ID is read from the source code generation rule information 125 (607).
  • the name label corresponding to the current element ID is read from the initial software model information 121 or the generated software model 122 (608).
  • the “[name]” tag position in the generated code template is replaced with a name label (609).
  • the connection destination element list corresponding to the current element ID is read from the initial software model information 121 or the generated software model information 122 (610).
  • Step 614 indicates the end position of the iterative process of step 611.
  • it is determined whether or not there is a “[body]” tag in the generated code template (615). If there is a “[body]” tag, the “[body]” tag position in the generated code template is replaced with a “body” comment (616). Next, it returns to step 604 and repeats processing.
  • Step 617 indicates the end position of the repetition process of step 604.
  • FIG. 7 shows a processing flow of the software model design intention extraction unit 103.
  • the software model design intention extraction unit 103 includes initial software model information 121 or generated software model information 122, software model design intention extraction rule information 124 storing rules for extracting a developer's design intention included in the software model, and Is input, and software model design intention information 123 which is design intention data included in the software model is output.
  • the initial software model information 121 or the generated software model information 122 is read (701).
  • the software model design intention extraction rule information 124 is read (702).
  • repetition is started for all element IDs included in the initial software model information 121 or the generated software model information 122 (703).
  • connection pattern analysis is performed for the element ID currently being processed (704).
  • a match flag which is a determination flag for determining whether there is a software model description that matches the design intention, is set to 0 (705).
  • repetition is started for all software model design intention extraction rule information 124 (706).
  • design intent matching is performed to determine whether the description of the software model matches the design intent (707).
  • Step 708 indicates the end position of the repetition process of step 706.
  • the match flag is greater than 0 (709). If it is not greater than 0, the corresponding element ID is output to the software model design intention information 123 (718). Next, the specified value of the code generation rule ID is output to the software model design intention information 123 (719). Next, the specified value of the design intention ID is output to the software model design intention information 123 (720). If it is determined in step 709 that the match flag is greater than 0, it is determined whether the match flag is 1 (710). If the match flag is not 1, the corresponding element ID is output to the software model design intention information 123 (715). Next, the code generation ID of the rule with the highest priority in the matched software model design intention extraction rule information 124 is output to the software model design intention information 123 (716).
  • the design intention ID of the rule having the highest priority among the matched software model design intention extraction rule information 124 is output to the software model design intention information 123 (717). If the match flag is 1 in step 710, the corresponding element ID is output to the software model design intention information 123 (711). Next, the code generation ID of the matched software model design intention extraction rule information 124 is output to the software model design intention information 123 (712). Next, the design intention ID of the matched software model design intention extraction rule information 124 is output to the software model design intention information 123 (713). Next, the priority of the matched software model design intention extraction rule information 124 is increased by 1 (714). Next, it returns to step 704 and repeats processing. Step 721 indicates the end position of the repetitive processing in step 703.
  • FIG. 8 shows a processing flow of a connection pattern analysis subroutine called in step 704 from the processing flow of the software model design intention extraction unit 103 of FIG.
  • the number of connections, the number of connections, the average connection distance, the maximum connection distance, the minimum connection distance, the average connection distance, the maximum connection distance, the minimum connection distance, the total connection distance, and the total connection distance are set to 0 ( 801).
  • the connection direction list is emptied (802).
  • the connection destination element list of the corresponding element ID is read (803).
  • repetition is started for all connection destinations (804).
  • the number of connections is increased by 1 (805).
  • a connection distance with the connection destination element is calculated (806).
  • the connection distance value is updated (807).
  • Step 809 indicates the end position of the repetition process of step 804.
  • iterative processing is started for all the connected destinations (810).
  • the connected number is increased by 1 (811).
  • the connection distance to the connected element is calculated (812).
  • the value of the connected distance is updated (813).
  • the connection direction of the connection destination is added to the connection direction list (814).
  • Step 815 indicates the end position of the repetition process of Step 810.
  • FIG. 9 shows a processing flow of a connection distance calculation subroutine with a connection destination element called in step 806 from the connection pattern analysis subroutine of FIG.
  • the coordinates of the connection destination element are obtained (901).
  • the coordinates of the current processing target element are obtained (902).
  • the horizontal axis coordinate of the processing target element is set in X1
  • the vertical axis coordinate of the processing target element is set in Y1 (903).
  • the horizontal axis coordinate of the connection destination element is set in X2, and the vertical axis coordinate of the connection destination element is set in Y2 (904).
  • is set as the distance (905).
  • FIG. 10 shows a processing flow of a connection distance calculation subroutine with a connected element called in step 812 from the connection pattern analysis subroutine of FIG.
  • the coordinates of the connected element are obtained (1001).
  • the coordinates of the current processing target element are obtained (1002).
  • the horizontal axis coordinate of the processing target element is set in X1
  • the vertical axis coordinate of the processing target element is set in Y1 (1003).
  • the horizontal axis coordinate of the connected element is set in X2, and the vertical axis coordinate of the connected element is set in Y2 (1004).
  • FIG. 11 shows the flow of a connection distance value update subroutine called from the connection pattern analysis subroutine of FIG. 8 in step 807.
  • the distance to the connection destination is added to the total connection distance (1101).
  • a value obtained by dividing the total connection distance by the number of connections is set to the average connection distance (1102).
  • the distance to the connection destination is set as the minimum connection distance (1104).
  • FIG. 12 shows a process flow of a connected distance value update subroutine called from the connection pattern analysis subroutine of FIG. 8 in step 813.
  • the distance to the corresponding connected destination is added to the total connected distance (1201).
  • a value obtained by dividing the total connected distance by the number of connected to the average connected distance is set (1202).
  • FIG. 13 shows the process flow of the design intention matching subroutine called in step 707 from the process flow of the software model design intention extraction unit 103 of FIG.
  • the type match weight value, the description position match weight value, and the connection pattern match weight value are read (1301).
  • the coincidence threshold value is read (1302).
  • 0 is set as the matching likelihood (1303).
  • it is determined whether the description positions match (1306). If the description positions do not match, the process proceeds to step 1308. If the description positions match, the description position match weight value is added to the match likelihood (1307).
  • connection patterns match it is determined whether or not the connection patterns match (1308). If the connection patterns do not match, the process proceeds to step 1310. If the connection patterns match, the connection pattern match weight value is added to the match likelihood (1309). Next, it is determined whether the match likelihood is equal to or greater than a match threshold (1310). If the match likelihood is smaller than the match threshold, the process ends. If the match likelihood is greater than or equal to the match threshold, the value of the match flag is increased by 1 (1311).
  • FIG. 14 shows a processing flow of the database update management unit 110.
  • the database update management unit 110 instructs the rule database unit 105 to modify the database in response to an instruction from the rule improvement unit 111.
  • a database correction instruction is received (1401).
  • the software model design intention extraction rule database 107 is modified (1407). Next, it is determined whether or not it is a source code generation rule correction instruction (1404). If it is not a source code generation rule correction instruction, the software model generation rule database 106 is corrected (1405). If it is a source code generation rule correction instruction, the source code generation rule database 109 is corrected (1406).
  • FIG. 15 shows a processing flow of the source code design intention extraction unit 113.
  • the source code design intention extraction unit 113 stores the source code design intention extraction rule information 126 that stores the modified source code information 129 or the regenerated source code information 128 and a rule for extracting the design intention of the developer included in the source code.
  • source code design intention information 130 which is design intention data included in the source code is output.
  • the modified source code information 129 or the regenerated source code information 128 is read (1501).
  • the source code design intention extraction rule information 126 is read (1502).
  • iterative processing is started for all block IDs included in the read source code information (1503).
  • a related pattern representing the connection between blocks is analyzed (1504).
  • Step 1505 the description characteristics of the block are analyzed and set (1505).
  • a match flag indicating whether or not it matches the design intention is set to 0 (1506).
  • iterative processing is started for all source code design intention extraction rule information 126 (1507).
  • design intent matching is performed to determine whether the design intent matches the block to be processed (1508).
  • the process returns to step 1508 to repeat the process.
  • Step 1509 indicates the end position of the iterative process of step 1507.
  • Step 1510 indicates the end position of the iterative process of step 1503. If the match flag is greater than 0 in step 1510, it is determined whether the match flag is 1 (1511). If the match flag is not 1, the corresponding block ID is output to the source code design intention information 130 (1516).
  • Step 1522 indicates the end position of the iterative process of step 1503. If the match flag is 1 in step 1511, the block ID is output to the source code design intention information 130 (1512). Next, the software model generation ID of the matched source code design intention extraction rule information 126 is output to the source code design intention information 130 (1513).
  • Step 1522 indicates the end position of the iterative process of step 1503.
  • FIG. 16 shows a processing flow of a related pattern analysis subroutine called in step 1504 from the processing flow of the source code design intention extraction unit 113 of FIG.
  • the number of associations, the total association distance, the average association distance, the maximum association distance, the minimum association distance, and the direction value are set to zero. Further, the relation type and the relation direction are made empty (1601).
  • the related list of the corresponding block ID is read (1602).
  • iterative processing is started for all related destinations included in the related list of the corresponding block ID (1603).
  • the number of associations is increased by 1 (1604).
  • the distance to the related block is calculated (1605).
  • the distance value is updated (1606).
  • the related direction is updated (1607).
  • a relation type is set (1608). Next, it returns to step 1604 and repeats processing.
  • Step 1609 indicates the end position of the iterative process of step 1603.
  • FIG. 17 shows a processing flow of a distance calculation subroutine with respect to a related block called in step 1605 from the related pattern analysis subroutine of FIG.
  • the record corresponding to the related block ID is read (1701).
  • the start line of the record of the corresponding block ID is set to L1 (1702).
  • the end line of the record of the block ID currently being processed is set to L2 (1703).
  • is calculated as a distance (1704).
  • FIG. 18 shows a processing flow of a distance value update subroutine called from the related pattern analysis subroutine of FIG. 16 in step 1606.
  • the distance to the relevant destination is added to the total related distance (1801).
  • a value obtained by dividing the total connection distance by the number of connections is set to the average connection distance (1802).
  • FIG. 19 shows a processing flow of a related direction update subroutine called from the related pattern analysis subroutine of FIG. 16 in step 1607.
  • the record corresponding to the related block ID is read (1901).
  • the start line of the corresponding block ID is set to D (1902).
  • the start line of the block ID currently being processed is set to S (1903).
  • FIG. 20 shows the processing flow of the related type setting subroutine called from the related pattern analysis subroutine of FIG. 16 in step 1608.
  • the related type is read from the related item being processed (2001).
  • the related type ID of the corresponding related type is obtained from the related type table (2002).
  • the related type ID is added to the related type list (2003).
  • FIG. 21 shows a processing flow of a description characteristic analysis / setting subroutine called in step 1505 from the processing flow of the source code design intention extraction unit 113 of FIG.
  • the start line of the block currently being processed is set to S (2101).
  • the end line of the block currently being processed is set to E (2102).
  • the value of relation number / (ES) is set in the description characteristic (2103).
  • FIG. 22 shows a process flow of a design intention matching subroutine called in step 1508 from the process flow of the source code design intention extraction unit 113 of FIG.
  • a type match weight value, a description characteristic match weight value, and a related pattern match weight value are read (2201).
  • the coincidence threshold value is read (2202).
  • 0 is set as the matching likelihood (2203).
  • step 2210 it is determined whether or not the related patterns match. If the related patterns do not match, the process proceeds to step 2210. If the related patterns match, the related pattern match weight value is added to the match likelihood (2209). Next, it is determined whether or not the match likelihood is equal to or greater than a match threshold (2210). If the match likelihood is smaller than the match threshold, the process ends. If the match likelihood is greater than or equal to the match threshold, the value of the match flag is incremented by 1 (2211).
  • FIG. 23 shows a processing flow of the rule improvement unit 111.
  • the rule improvement unit 111 includes initial software model information 121, generated software model information 122, software model design intention information 123, software model design intention extraction rule information 124, source code generation rule information 125, modified source code information 129, and regenerated source code.
  • the information 128, the software model generation rule information 127, the source code design intention extraction rule information 126, and the source code design intention information 130 are input, and a database change instruction is given to the database change management unit 110.
  • the block difference list, element difference list, and related description list are emptied. Further, the additional rule ID, the target block ID, and the target element ID are set to 0. Further, the element ID calculation flag and the block ID calculation flag are set to NG (2301).
  • the modified source code information 129 is read (2302).
  • the regenerated source code information 128 is read (2303).
  • the manual correction source code 120 is read (2304).
  • the regenerated source code 118 is read (2305).
  • a block difference is extracted from the difference between the source code information (2306).
  • it is determined whether there is a difference between the extracted blocks (2307). If there is a block difference, a rule is added to the source code generation rule information 125 (2308). If there is no block difference in the determination in step 2307, the difference of each source code is extracted by text processing (2309).
  • iterative processing is started for all source code differences (2310). Next, it is determined whether the difference is within the block (2311).
  • Step 2317 indicates the end position of the iterative process of Step 2310. If the difference is inside the block, the related description is extracted (2312). Next, the block to which the difference belongs is specified, and the element ID describing the block is calculated (2313). Next, it is determined whether or not the element ID calculation flag is OK (2314). If the element ID calculation flag is not OK, the process returns to step 2310 to continue the repetition process. Step 2317 indicates the end position of the iterative process of Step 2310. If the element ID calculation flag is OK, the generated code template is modified (2315). Next, software model design intention extraction rule information is added (2316). Next, the process returns to step 2310 to continue the repetition process. Step 2317 indicates the end position of the iterative process of Step 2310.
  • the initial software model information 121 is read (2318).
  • the generated software model information 122 is read (2319).
  • the difference between the elements included in the software model information is extracted (2320).
  • it is determined whether there is an element added based on the extracted difference (2321). If there is an added element, the rule is added to the software model generation rule information 127 and the process proceeds to step 2323 (2322). If there is no added element in the determination in step 2321, the connection destination difference is extracted (2323).
  • iterative processing is started for all connection destination differences (2324). Next, it is determined whether there is a difference in connection destination (2325). If there is no connection destination difference, the process returns to step 2324 to continue the process repeatedly.
  • Step 2330 indicates the end position of the iterative process of Step 2324. If there is a difference between the connection destinations, the element ID is specified and the block ID is calculated (2326). Next, it is determined whether the block ID calculation flag is OK (2327). If the block ID calculation flag is not OK, the process returns to step 2324 to continue the repetition process. Step 2330 indicates the end position of the iterative process of Step 2324. If it is determined in step 2327 that the block ID calculation flag is OK, the generated software model template is modified (2328). Next, source code design intention extraction rule information is added (2329). Next, the process returns to step 2324 to continue the repetition process. Step 2330 indicates the end position of the iterative process of Step 2324.
  • FIG. 24 shows a processing flow of a subroutine for extracting a block difference from the source code information difference called in step 2306 from the processing flow of the rule improving unit 111 of FIG.
  • iterative processing is started for all block names included in the modified source code information 129 (2401).
  • the block name of the modified source code information is acquired (2402).
  • iterative processing is started for all block names included in the regenerated source code information 128 (2403).
  • the block name of the regenerated source code information 128 is acquired (2404).
  • it is determined whether or not the block names match (2405). If the block names do not match, the source code information of the corresponding block is added to the block difference list (2406).
  • the process returns to step 2403 to continue the repeated processing.
  • Step 2407 indicates the end position of the repetitive processing in step 2403. If the block names match in the determination in step 2405, the process returns to step 2403 without executing step 2406, and the repetition process is continued. Step 2407 indicates the end position of the repetitive processing in step 2403. Next, the process returns to step 2401 to continue the repetition process. Step 2408 indicates the end position of the iterative process of step 2401.
  • FIG. 25 shows a processing flow of a subroutine for adding a rule to the source code generation rule information called in step 2308 from the processing flow of the rule improvement unit 111 of FIG.
  • the maximum code generation rule ID of the source code generation rule information is set as the additional rule ID (2501).
  • iterative processing is started for all elements in the block difference list (2502).
  • the additional rule ID is increased by 1 (2503).
  • a new code generation rule record is created (2504).
  • an additional rule ID is set as the code generation rule ID of the new record (2505).
  • the design intent ID of the new record is set to 1 (2506).
  • the source code corresponding to the differential block ID currently being processed is acquired from the manually corrected source code 120 (2507).
  • Step 2513 indicates the end position of the repetition processing of step 2502.
  • FIG. 26 shows a processing flow of a subroutine for extracting the related description called in step 2312 from the processing flow of the rule improving unit 111 of FIG.
  • iterative processing is started for each line of the extraction target source code (2601).
  • the extraction target line is read (2602).
  • it is determined whether or not the read target line is a related description (2603). If the read target line is not a related description, the process returns to step 2601 to continue the process repeatedly.
  • Step 2605 indicates the end position of the repetitive processing of Step 2601. If the target line read in the determination in step 2603 is a related description, a related description part is added to the related description list (2604).
  • the process returns to step 2601 and the repeated processing is continued.
  • Step 2605 indicates the end position of the repetitive processing of Step 2601. Note that, also in step 2508 in FIG. 25, a subroutine for extracting the related description in FIG. 26 is called.
  • FIG. 27 shows a processing flow of a subroutine for calculating an element ID by specifying a block called in step 2313 from the processing flow of the rule improving unit 111 of FIG.
  • the target block name is emptied (2701).
  • the line number of the differential line currently being processed is set to L (2702).
  • iterative processing is started for all block IDs of the modified source code information 129 (2703).
  • the start line of the block ID currently being processed is set to S (2704).
  • the end line of the block ID currently being processed is set to E (2705).
  • Step 2714 indicates the end position of the iterative process of Step 2703. If S ⁇ L ⁇ E in the determination in step 2706, the block name corresponding to the block ID currently being processed is set as the target block name (2707). Next, iterative processing is started for all element IDs of the generated software model information 122 (2708). Next, a name label corresponding to the current element ID is acquired (2709). Next, it is determined whether the target block name matches the name label (2710). If the name labels do not match, the process returns to step 2708 to continue the repetition process. Step 2711 indicates the end position of the iterative process of Step 2708. If the name labels match in the determination of step 2710, the current element ID is set as the target element ID (2712). Next, the element ID calculation flag is set to OK, and the process ends (2713).
  • FIG. 28 shows a processing flow of a generated code template correction subroutine called in step 2315 from the processing flow of the rule improving unit 111 of FIG.
  • the software model design intention information 123 is read (2801).
  • a code generation rule ID and a design intention ID corresponding to the target element ID are acquired (2802).
  • the source code generation rule information 125 is read (2803).
  • a generated code template corresponding to the code generation rule ID and the design intention ID is acquired (2804).
  • a record corresponding to the target block ID of the modified source code information 129 is acquired (2805).
  • a start line and an end line corresponding to the target block ID of the modified source code information 129 are obtained (2806).
  • the source code from the start line to the end line is acquired from the modified source code (2807).
  • a related description is extracted (2808).
  • the extracted related description is converted into a tag corresponding to the related type (2809).
  • descriptions other than the related ones are replaced with [body] tags (2810).
  • a block signature is added to replace the corresponding generated code template (2811).
  • the subroutine for extracting the related description in FIG. 26 is called.
  • FIG. 29 shows the processing flow of the software model design intention extraction rule information addition subroutine called in step 2316 from the processing flow of the rule improvement unit 111 of FIG.
  • a new software model design intention extraction rule information record is created (2901).
  • the corrected software model information is read (2902).
  • the type corresponding to the target element ID of the corrected software model information is set as the type of the new record (2903).
  • prescribed values are set in the description position and connection pattern of the new record (2904).
  • prescribed values are set for the matching threshold and priority (2905).
  • a prescribed value is set for all the matching weights (2906).
  • the code generation rule ID obtained in the generated code template correction process is set in the code generation rule ID (2907).
  • the design intention ID obtained in the process of correcting the generated code template is set in the design intention ID (2908).
  • FIG. 30 shows a processing flow of a subroutine for extracting the difference between the elements of the software model information called in step 2320 from the processing flow of the rule improving unit 111 of FIG.
  • iterative processing is started for all name labels in the initial software model information 121 (3001).
  • the name label of the initial software model information 121 is acquired (3002).
  • iterative processing is started for all name labels in the generated software model information 122 (3003).
  • the name label of the generated software model information 122 is acquired (3004).
  • it is determined whether or not the name labels match (3005). If the name labels do not match, the software model information of the corresponding element is added to the element difference list (3006).
  • the process returns to step 3003 to continue the repetition process.
  • Step 3007 indicates the end position of the iterative process of Step 3003. If the name labels match in the determination in step 3005, the process returns to step 3003 without executing step 3006 and the process is repeated.
  • Step 3007 indicates the end position of the iterative process of Step 3003.
  • Step 3008 indicates the end position of the repetition processing of step 3001.
  • FIG. 31 shows a processing flow of a subroutine for adding a rule to the software model generation rule information called in step 2322 from the processing flow of the rule improvement unit 111 of FIG.
  • the maximum software model generation rule ID of the software model generation rule information 127 is set as an additional rule ID (3101).
  • iterative processing is started for all elements in the element difference list (3102).
  • the additional rule ID is increased by 1 (3103).
  • a new software model generation rule record is created (3104).
  • an additional rule ID is set as the software model generation rule ID of the new record (3105).
  • the design intent ID of the new record is set to 1 (3106).
  • a model element corresponding to the difference element ID currently being processed is acquired from the software model (3107).
  • Step 3111 indicates the end position of the repetition process of Step 3102.
  • FIG. 32 shows a processing flow of a subroutine for calculating the block ID by specifying the element ID called in step 2326 from the processing flow of the rule improving unit 111 of FIG.
  • an element ID including a connection destination difference is acquired (3201).
  • the name label corresponding to the element ID currently being processed is set as the target name label (3202).
  • an iterative process is started for all block IDs of the modified source code information 129 (3203).
  • a block name corresponding to the current block ID is acquired (3204).
  • Step 3206 indicates the end position of the iterative process of step 3203. If it is determined in step 3205 that the target name label matches the block name, the current block ID is set as the target block ID (3207).
  • the block ID calculation flag is set to OK (3208).
  • FIG. 33 shows the processing flow of the generated software model template correction subroutine called in step 2328 from the processing flow of the rule improving unit 111 of FIG.
  • the source code design intention information 130 is read (3301).
  • a software model generation rule ID and a design intention ID corresponding to the target block ID are acquired (3302).
  • the software model generation rule information 127 is read (3303).
  • a generated software model template corresponding to the software model generation rule ID and the design intention ID is acquired (3304).
  • a record corresponding to the target element ID of the generated software model information 122 is acquired (3305).
  • a model element corresponding to the target element ID of the generated software model information 122 is obtained from the generated software model (3306).
  • the label of each element is replaced with a tag (3307).
  • the generated software model template is replaced (3308).
  • FIG. 34 shows the processing flow of the source code design intention extraction rule information addition subroutine called in step 2329 from the processing flow of the rule improvement unit 111 of FIG.
  • a new source code design intention extraction rule information record is created (3401).
  • the regenerated source code information 128 is read (3402).
  • the type corresponding to the target block ID in the regenerated source code information 128 is set as the type of the new record (3403).
  • prescribed values are set in the description characteristics and related patterns of the new record (3404).
  • prescribed values are set for the matching threshold and priority (3405).
  • a prescribed value is set for all the matching weights (3406).
  • the software model generation rule ID obtained in the generation source code template correction process is set in the software model generation rule ID (3407).
  • the design intention ID obtained in the process of correcting the generated source code template is set in the design intention ID (3408).
  • FIG. 35 shows a processing flow of the source code reading unit 112.
  • the source code reading unit 112 receives the manually modified source code 120 created or modified by the developer 119, converts it into data that can be easily processed by a computer, and outputs it as regenerated source code information 128 or modified source code information 129.
  • the in-block flag is turned off (3501).
  • iterative processing is started for all source code lines (3502).
  • the next line is read (3503).
  • it is determined whether or not the in-block flag is ON (3504). If the in-block flag is not ON, it is determined whether it is a block start element (3505). If it is not a block start element, the process returns to step 3502 to continue the repeated processing.
  • Step 3515 indicates the end position of the iterative process of Step 3502. If it is determined in step 3505 that the element is a block start element, the in-block flag is turned ON (3506). Next, the block ID is incremented by 1 (3507). Next, an empty source code information record for one block is created (3508). Next, a block ID is set in the created source code information record (3509). Next, the block name is read (3510). Next, a block name is set in the block name record (3511). Next, the type is read (3512). Next, a type name is set in the type name record (3513). The current number of lines is set as the start line (3514). Next, the process returns to step 3502 to continue the repetition.
  • Step 3515 indicates the end position of the iterative process of Step 3502. If the in-block flag is ON in the determination in step 3504, it is determined whether or not the description is related (3517). If it is not a related description, it is determined whether it is a block end element (3523). If it is not a block end element, the process returns to step 3502 to continue the repetition.
  • Step 3515 indicates the end position of the iterative process of Step 3502. If it is determined in step 3523 that it is a block end element, the current line number is set as the end line (3524). Next, the in-block flag is turned OFF (3525). Next, the process returns to step 3502 to continue the repetition. Step 3515 indicates the end position of the iterative process of Step 3502.
  • a new related item is added to the related list of the current processing target record (3518).
  • the association type is read (3519).
  • a related type is set to the current new target item to be processed (3520).
  • the associated name label is read (3521).
  • a related name label is temporarily set to the related destination ID of the current new target item to be processed (3522), and the process proceeds to step 3523.
  • the related destination ID setting process in the related list is executed (3516).
  • FIG. 36 shows the processing flow of the related destination ID setting processing subroutine in the related list called in step 3516 from the processing flow of the source code reading unit 112 of FIG.
  • iterative processing is started for all block IDs (3601).
  • the related list of the target block is read (3602).
  • iterative processing is started for all related items in the related list (3603).
  • the related destination ID of the target related item is read (3604).
  • Step 3611 indicates the end position of the iterative process of Step 3603.
  • step 3605 If it is determined in step 3605 that the related destination ID is a name label, the iterative process is started for all block IDs (3606). Next, the block ID of the target block is read (3607). Next, it is determined whether the block name of the target block matches the name label (3608). If the block name of the target block does not match the name label, the process returns to step 3606 to continue the repetition process.
  • Step 3609 indicates the end position of the iterative process of step 3606. If the block name of the target block matches the name label in the determination processing in step 3608, the related destination ID of the target related item is replaced with the corresponding block ID (3610). Next, the process returns to step 3603 to continue the repetition process.
  • Step 3611 indicates the end position of the iterative process of Step 3603.
  • Step 3612 indicates the end position of the repetitive processing in step 3601.
  • FIG. 37 shows software model information used as the initial software model information 121 or the generated software model information 122.
  • an element ID 3701 that is a serial number of an element included in the software model
  • a name label 3702 that is a name given to the element
  • a type 3703 that is an element description type
  • an element are described.
  • a description position 3704 representing the position of the element
  • a connection destination element list 3707 representing the connection of each element with the other element
  • a connected element list 3708 representing the connection of each element from the other element.
  • the connection destination element list 3707 is composed of an element ID 3705 representing the connection destination element and a connection direction 3706 representing the connection direction.
  • the connected element list 3708 includes an element ID 3717 indicating a connection source element connected from another element, and a connection direction 3718 indicating the connection direction itself.
  • 0 is stored in each column.
  • the element ID is “n”
  • the name label is “dd_lib”
  • the type is “function”
  • the description position is “bottom right”
  • the element ID of the connection destination element list is “0”.
  • the connection direction of the connection destination element list is “none”
  • the element ID of the connection destination element list is “2”
  • the connection direction of the connection destination element list is “up”.
  • FIG. 38 shows the software model design intention information 123.
  • the software model design intention information 123 includes an element ID 3801 for identifying an element described in the software model, a code generation rule ID 3802 for identifying a code generation rule, and a design intention ID 3803 for identifying design intent data.
  • an element ID 3801 for identifying an element described in the software model
  • a code generation rule ID 3802 for identifying a code generation rule
  • a design intention ID 3803 for identifying design intent data.
  • the case where the element ID is “n”, the code generation rule ID is “6”, and the design intention ID is “1” is shown.
  • FIG. 39 shows software model design intention extraction rule information 124.
  • the software model design intention extraction rule information 124 includes a type 3901 indicating the type of an element described in the software model, a description position 3903 indicating a description position of the element described in the software model, and an element description described in the software model.
  • a connection pattern 3906 obtained by quantifying the connection pattern, a matching threshold 3915 that is a threshold for determining that the connection matches the software model design intention extraction rule, and a priority 3916 that indicates a priority when a plurality of similar rules match.
  • the connection pattern 3906 includes a connection number 3905 indicating the number of connection of the corresponding element to the other element, a connected number 3907 indicating the number of connection of the corresponding element from the other element, a connection distance 3912 indicating the distance of each connection, A connection direction 3913 indicating a connection direction between the elements.
  • the connection distance 3912 has two fields, IN3919 and OUT3920, according to the connection direction 3908. From the average connection distance (AVE) 3909, the minimum connection distance (MIN) 3910, and the maximum connection distance (MAX) 3911, respectively. Become.
  • the type 3901, the description position 3903, and the connection pattern 3906 have matching weights 3902, 3904, and 3914 for weighting conditions in the case where matching is determined, respectively.
  • the type is “function”, the type matching weight value is “7”, the description position is “left center”, the description position matching weight value is “1”, and the connection of the connection pattern
  • the number is “2”, the number of connected is “4”, the average distance in the input direction (IN) of the connection distance is “1.3”, the minimum value is “1”, and the maximum value Is “2”, the average distance in the outgoing direction (OUT) is “2.5”, the minimum value is “2”, the maximum value is “3”, and the connection direction is “down”
  • the matching weight value of the connection pattern is “2”, the matching threshold value is “29”, the priority is “2”, the code generation rule ID is “5”, and the design intention ID is “8”. The case is shown.
  • FIG. 40 shows the source code generation rule information 125.
  • the source code generation rule information 125 is a table storing information for converting elements described in the software model into source code.
  • the source code generation rule information 125 includes a code generation rule ID 4001 for identifying a code generation rule, a design intent ID 4002 for identifying a difference in generated code caused by a difference in developer design intention among the same code generation rules, and source code As a generated code template 4003 in which a template of a code to be output is stored.
  • a case where the code generation ID is “1”, the design intention ID is “1”, and the generated code template is “class [name] ⁇ [reference] [body] ⁇ ” 4006 is shown.
  • FIG. 41 shows source code information used as the regenerated source code information 128 or the modified source code information 129.
  • the source code information 128 and 129 includes a block ID 4101 that represents a number for identifying a block in the source code, a name label 4102 that represents a name such as a function name, and a type 4103 that represents the type of the block. , A description position 4106 indicating the description position of the block in the source code, and a relation list 4109 listing the relation between each block and other blocks.
  • the description position 4106 includes a start line 4104 that represents the start line of the block and an end line 4105 that represents the end line of the block.
  • the related list 4109 includes a related type 4107 representing the type of the related block, and a related block ID 4108 that is a block ID for identifying the related block. If there is no related block, “None” is set for the related type 4107 in the related list, and “0” is set for the related block ID 4108.
  • the block ID is “n”
  • the name label is “dd_drv”
  • the type is “function”
  • the start line of the description position is “9788”
  • the end line of the description position is “9901”.
  • the relationship type of the related list is “none”
  • the related block ID of the related list is “0”.
  • FIG. 42 shows the source code design intention information 130.
  • the source code design intention information 130 includes a block ID 4201 for identifying a block described in the source code, a software model generation rule ID 4202 for identifying a software model generation rule corresponding to the block of the source code, a design intention It consists of a design intent ID 4203 for identifying data.
  • the block ID is “n”
  • the software model generation rule ID is “6”
  • the design intention ID is “1”.
  • FIG. 43 shows the source code design intent extraction rule information 126.
  • the source code design intent extraction rule information 126 includes a type 4301 for identifying the type of a block described in the source code, a description characteristic 4303 indicating a description characteristic of the block described in the source code, a block and another block.
  • a relation pattern 4305 representing a relation pattern between the two, a matching threshold 4314 that is a threshold for determining that the source code design intention extraction rule matches, and a priority 4315 that indicates a priority when a plurality of similar rules match.
  • a software model generation rule ID 4316 for identifying a software model generation rule
  • a design intention ID 4317 for identifying a design intention.
  • the relation pattern 4305 indicates the relation number 4306 indicating the number of relevant blocks related to other blocks, the distance 4307 indicating the distance of each relation, and whether the relation between blocks is more strongly related in the front-rear direction on the source code.
  • the relation direction 4311 and the relation type 4312 converted into a numerical value by using the relation type information table shown in FIG.
  • the distance 4307 of the related pattern 4305 includes an average distance value (AVE) 4308, a minimum distance value (MIN) 4309, and a maximum distance value (MAX) 4310.
  • the type 4301, the description characteristic 4303, and the related pattern 4305 have matching weights 4302, 4304, and 4313 for weighting conditions in the case where matching is determined.
  • the type is “class”, the type matching weight value is “7”, the description characteristic is “0.6”, the description characteristic matching weight value is “1”, and the relation of the related pattern
  • the number is “4”, the average value of the related pattern distance is “1.3”, the minimum value of the related pattern distance is “1”, and the maximum value of the related pattern distance is “2”.
  • the related direction of the related pattern is “forward dominant”
  • the related type of the related pattern is “17, 17, 17, 17”
  • the match weight value of the related pattern is “2”
  • the match threshold is “ 29 ”
  • the priority is“ 2 ”
  • the software model generation rule ID is“ 5 ”
  • the design intention ID is“ 8 ”.
  • FIG. 44 shows a related type information table used for the source code design intention extraction rule information 126.
  • the related type information table includes a related type ID 4401 for identifying the related type, and a related type 4402 representing the related type itself. As an example, the case where the related type ID is “n” and the related type is “included” is shown.
  • FIG. 45 shows software model generation rule information 127.
  • the software model generation rule information 127 is a table storing information for converting a block described in the source code into a software model, and the same software model generation as the software model generation rule ID 4501 for identifying the software model generation rule
  • the rule includes a design intent ID 4502 for identifying a difference in a generated software model caused by a difference in developer's design intent, and a generated software model template 4503 storing a software model template to be output as a software model.
  • the software model generation rule ID is “1”
  • the design intention ID is “1”
  • the generated software model template is a graphic (4506) shown in the drawing is shown.
  • FIG. 46 shows a processing flow of the software model generation unit 114.
  • the software model generation unit 114 receives the modified source code information 129 or the regenerated source code information 128, the source code design intention information 130, and the software model generation rule information 127 that stores rules for generating a software model.
  • a generated software model 116 corresponding to the manually modified source code 120 or the regenerated source code 118 is output.
  • source code information 128 and 129 are read (4601).
  • the source code design intention information 130 is read (4602).
  • the software model generation rule information 127 is read (4603).
  • iterative processing is started for all block IDs (4604).
  • the software model generation rule ID corresponding to the current block ID is read from the source code design intention information 130 (4605).
  • the design intention ID corresponding to the current block ID is read from the source code design intention information 130 (4606).
  • a generated software model template corresponding to the rule ID / design intention ID is read from the software model generation rule information 127 (4607).
  • the block name corresponding to the current block ID is read from the source code information 128 and 129 (4608).
  • a block in which the “[name]” tag position in the generated software template is replaced with the block name is drawn (4609).
  • the related list corresponding to the current block ID is read from the source code information 128 and 129 (4610).
  • iterative processing is started for the connection destination in the related list (4611).
  • the block name corresponding to the related block ID is read from the source code information 128 and 129 (4612).
  • it is determined whether a model corresponding to the block name has already been drawn (4613). If a model corresponding to the block name has already been drawn, a block corresponding to the block name is searched from the drawing models (4614).
  • an empty connection port of the related block is selected (4615).
  • Step 4617 indicates the end position of the repetition processing of Step 4611. If the model corresponding to the block name has not yet been drawn in the determination of step 4613, the block in which the “[Ref]” or “[calle]” tag position in the generated software model template is replaced with the name label is drawn. (4619). Next, a connection line according to the model figure in the generated software model template is added (4620). Next, the process returns to step 4611 to continue the repeated processing. Step 4617 indicates the end position of the repetition processing of Step 4611. Step 4618 indicates the end position of the iterative process of step 4604.
  • FIG. 47 shows an example of a software model.
  • Reference numeral 4701 denotes the entire frame of the software model.
  • Reference numeral 4702 denotes an element drawn on the software model.
  • the stereotype is “module”
  • the name label is “GUI_io”
  • the other element “proc_ctrl” is connected to the connection line 4704 via the connection port 4703.
  • the element GUI_io is a description position at the upper left.
  • the software model exemplified in the present embodiment is a software model based on UML, but software models using other graphical representations can also be used.
  • the generated source code is C language or C ++ language, the same implementation is possible even if it is replaced with another programming language.
  • FIG. 48 is a configuration diagram of a system including an input / output unit in addition to the software development support tool 101 in the embodiment of the present invention.
  • a configuration in which the developer 131 directly inputs a software model to the computer system through the input unit 4801 and the automatically generated source code is displayed on the display device (display unit) 4802 is shown.
  • the developer 119 can directly input the source code into the computer system through the input unit 4804, and the automatically generated software model can be displayed on the display device (display unit) 4803.
  • the display devices 4802 and 4803 paper output using a printer, read-out output by speech synthesis, or the like may be used.
  • a document scanner, image data input, or the like may be used instead of the input units 4801 and 4804.
  • a software model including the design intention of the software developer can be easily obtained from a large-scale source code.
  • a software development support tool that contributes to software productivity it can be widely used in general software design.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Description

ソフトウェア開発支援ツール
 本発明は、ソースコードからソフトウェアモデルを生成することによるソフトウェア開発手法を支援するツールに関するものである。
 従来のソースコードからソフトウェアモデルを生成することによるソフトウェア開発支援ツールとして、実際のソースプログラムからプログラム構成図を自動的に生成できるものが知られている(特許文献1参照)。
特開昭63-273131号公報
 上記従来のソフトウェア開発支援ツールでは、ソースコードに記述されている字面だけを形式的にモデルに変換しており、開発者の設計意図を含むことが困難である。設計情報の重要な要素である開発者の設計意図が含まれないモデル記述では、後の追加・修正が非常に困難である。設計意図を含む形でのモデル記述を得るために、現状では人手での変換に頼らざるを得ず、膨大な既存ソフトウェア資産をモデル記述に変換するのは規模の面からもコストの面からも非常に非効率かつ困難な作業となってしまう。
 本発明は、上記課題を解決するため、既存のソースコードから開発者の設計意図を含んだソフトウェアモデルを自動的に生成し、ソフトウェアモデルを中心としたソフトウェア設計手法を容易に実現することを目的とする。
 前記従来の課題を解決するために、本発明のソフトウェア開発支援ツールは、開発者によって記述されたソフトウェアモデルを入力としてソースコードの自動生成に必要な情報をソフトウェアモデル情報として出力するソフトウェアモデル読み込み部と、前記ソフトウェアモデル情報とソフトウェアモデルに記述された開発者の設計意図を抽出するためのルールを記述したソフトウェアモデル設計意図抽出ルール情報とを入力としてソフトウェアモデルに記述された開発者の設計意図を抽出しソフトウェアモデル設計意図情報として出力するソフトウェアモデル設計意図抽出部と、前記ソフトウェアモデル情報と前記ソフトウェアモデル設計意図情報とソフトウェアモデルからソースコードを生成するためのルールを記述したソースコード生成ルール情報とを入力としてソースコードを出力するソースコード生成部と、ソースコードを入力としてソフトウェアモデルの自動生成に必要な情報をソースコード情報として出力するソースコード読み込み部と、前記ソースコード情報とソースコードに記述された開発者の設計意図を抽出するためのルールを記述したソースコード設計意図抽出ルール情報とを入力としてソースコードに記述された開発者の設計意図を抽出しソースコード設計意図情報として出力するソースコード設計意図抽出部と、前記ソースコード情報と前記ソースコード設計意図情報とソースコードからソフトウェアモデルを生成するためのルールを記述したソフトウェアモデル生成ルール情報とを入力としてソフトウェアモデルを出力するソフトウェアモデル生成部と、前記ソフトウェアモデル生成ルール情報と前記ソフトウェアモデル設計意図抽出ルール情報と前記ソースコード生成ルール情報と前記ソースコード設計意図抽出ルール情報とをデータベースに蓄積して管理するルールデータベース部と、前記ルールデータベース部の内容更新を管理するデータベース更新管理部と、前記ソフトウェアモデル情報と前記ソフトウェアモデル生成ルール情報と前記ソフトウェアモデル設計意図抽出ルール情報と前記ソフトウェアモデル設計意図情報と前記ソースコード情報と前記ソースコード生成ルール情報と前記ソースコード設計意図抽出ルール情報と前記ソースコード設計意図情報とを入力として前記ソフトウェアモデル生成ルール情報と前記ソフトウェアモデル設計意図抽出ルール情報と前記ソースコード生成ルール情報と前記ソースコード設計意図抽出ルール情報とを開発者の意図を反映するよう修正するための指示を前記データベース更新管理部に指示するルール改良部とを備えたことを特徴とする。
 本発明のソフトウェア開発支援ツールによれば、既存のソースコードから自動的に開発者の設計意図を含んだソフトウェアモデルを生成し、ソフトウェアモデルを中心としたソフトウェア設計手法を容易に実現することができる。また、新規にソフトウェアモデルを中心としたソフトウェア設計手法を用いてソフトウェア開発を行う場合には、抽象的なソフトウェアモデルから設計を始め、生成された初期生成ソースコードに開発者が修正を加え、更にソフトウェアモデルを生成させ、前記の抽象的なソフトウェアモデルと合成することを繰り返すことにより、より具体的なソフトウェアモデルを容易に開発することができる。
 本発明のソフトウェア開発支援ツールによれば、ソフトウェアモデルを中心としたソフトウェア設計手法を容易に実現することができる。
本発明の実施の形態におけるソフトウェア開発支援ツールの構成図である。 本発明の実施の形態におけるソフトウェアモデル読み込み部の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル読み込み部の記述要素の記述内容分析処理の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル読み込み部の記述要素の記述位置判定処理の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル読み込み部の記述要素の接続要素走査処理の動作流れ図である。 本発明の実施の形態におけるソースコード生成部の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル設計意図抽出部の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル設計意図抽出部の接続パターン分析処理の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル設計意図抽出部の接続先要素との接続距離算出処理の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル設計意図抽出部の被接続先要素との接続距離算出処理の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル設計意図抽出部の接続距離値更新処理の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル設計意図抽出部の被接続距離値更新処理の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル設計意図抽出部の接続意図マッチング処理の動作流れ図である。 本発明の実施の形態におけるデータベース更新管理部の動作流れ図である。 本発明の実施の形態におけるソースコード設計意図抽出部の動作流れ図である。 本発明の実施の形態におけるソースコード設計意図抽出部の関連パターン分析処理の動作流れ図である。 本発明の実施の形態におけるソースコード設計意図抽出部の関連先ブロックとの距離算出処理の動作流れ図である。 本発明の実施の形態におけるソースコード設計意図抽出部の距離値更新処理の動作流れ図である。 本発明の実施の形態におけるソースコード設計意図抽出部の関連方向更新処理の動作流れ図である。 本発明の実施の形態におけるソースコード設計意図抽出部の関連種別設定処理の動作流れ図である。 本発明の実施の形態におけるソースコード設計意図抽出部の記述特性分析・設定処理の動作流れ図である。 本発明の実施の形態におけるソースコード設計意図抽出部の設計意図マッチング処理の動作流れ図である。 本発明の実施の形態におけるルール改良部の動作流れ図である。 本発明の実施の形態におけるルール改良部のソースコード情報の差分からブロックの差分を抽出する処理の動作流れ図である。 本発明の実施の形態におけるルール改良部のソースコード生成ルール情報にルールを追加する処理の動作流れ図である。 本発明の実施の形態におけるルール改良部の関連記述を抽出する処理の動作流れ図である。 本発明の実施の形態におけるルール改良部のブロック特定して要素IDを算出する処理の動作流れ図である。 本発明の実施の形態におけるルール改良部の生成コードテンプレート修正処理の動作流れ図である。 本発明の実施の形態におけるルール改良部のソフトウェアモデル設計意図抽出ルール情報追加処理の動作流れ図である。 本発明の実施の形態におけるルール改良部のソフトウェアモデル情報の要素の差分を抽出する処理の動作流れ図である。 本発明の実施の形態におけるルール改良部のソフトウェアモデル生成ルール情報にルールを追加する処理の動作流れ図である。 本発明の実施の形態におけるルール改良部の要素IDを特定してブロックIDを算出する処理の動作流れ図である。 本発明の実施の形態におけるルール改良部の生成ソフトウェアモデルテンプレート修正処理の動作流れ図である。 本発明の実施の形態におけるルール改良部のソースコード設計意図抽出ルール情報追加処理の動作流れ図である。 本発明の実施の形態におけるソースコード読み込み部の動作流れ図である。 本発明の実施の形態におけるソースコード読み込み部の関連リスト内の関連先ID設定処理の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデル情報の例を示す図である。 本発明の実施の形態におけるソフトウェアモデル設計意図情報の例を示す図である。 本発明の実施の形態におけるソフトウェアモデル設計意図抽出ルール情報の例を示す図である。 本発明の実施の形態におけるソースコード生成ルール情報の例を示す図である。 本発明の実施の形態におけるソースコード情報の例を示す図である。 本発明の実施の形態におけるソースコード設計意図情報の例を示す図である。 本発明の実施の形態におけるソースコード設計意図抽出ルール情報の例を示す図である。 本発明の実施の形態における関連種別情報テーブルの例を示す図である。 本発明の実施の形態におけるソフトウェアモデル生成ルール情報の例を示す図である。 本発明の実施の形態におけるソフトウェアモデル生成部の動作流れ図である。 本発明の実施の形態におけるソフトウェアモデルの例を示す図である。 本発明の実施の形態におけるソフトウェア開発支援ツールに加えて入出力部を備えたシステムの構成図である。
 以下、本発明の実施の形態について、図面を参照しながら説明する。
 図1は、本発明の実施の形態におけるソフトウェア開発支援ツールの構成図である。図1において、101は本発明の実施の形態におけるソフトウェア開発支援ツールである。ソフトウェア開発支援ツール101において、ソフトウェアモデル読み込み部102は開発者131が作成した初期ソフトウェアモデル115又は生成ソフトウェアモデル116を入力として、図形的なソフトウェアモデルの記述を計算機処理が容易なデータに変換し、初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122として出力する。ソフトウェアモデル設計意図抽出部103は、初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122とソフトウェアモデルに含まれる開発者の設計意図を抽出するためのルールを格納したソフトウェアモデル設計意図抽出ルール情報124を入力として、ソフトウェアモデルに含まれる設計意図のデータであるソフトウェアモデル設計意図情報123を出力する。ソースコード生成部104は、初期ソフトウェアモデル情報121と、ソフトウェアモデル設計意図情報123と、ソースコードを生成するためのルールを格納したソースコード生成ルール情報125とを入力として初期ソフトウェアモデル115に対応する初期生成ソースコード117又は生成ソフトウェアモデル116に対応した再生成ソースコード118を出力する。ルールデータベース部105は、ソースコードからソフトウェアモデルを生成するためのルールを格納したデータベースであるソフトウェアモデル生成ルールデータベース106と、ソフトウェアモデルからソースコードを生成するためのルールを格納したデータベースであるソースコード生成ルールデータベース109と、ソフトウェアモデルに含まれる開発者の設計意図を抽出するためのルールを格納したデータベースであるソフトウェアモデル設計意図抽出ルールデータベース107と、ソースコードに含まれる開発者の設計意図を抽出するためのルールを格納したデータベースであるソースコード設計意図抽出ルールデータベース108とからなる。
 ルール改良部111は、初期ソフトウェアモデル情報121、生成ソフトウェアモデル情報122、ソフトウェアモデル設計意図情報123、ソフトウェアモデル設計意図抽出ルール情報124、ソースコード生成ルール情報125、修正ソースコード情報129、再生成ソースコード情報128、ソフトウェアモデル生成ルール情報127、ソースコード設計意図抽出ルール情報126、ソースコード設計意図情報130を入力として、ルールデータベース部105の中の4種のデータベース106~109の内容を修正することにより、ソフトウェアモデルからソースコードへの変換及びソースコードからソフトウェアモデルへの変換を、より開発者の意図にあったものに改良する。データベース更新管理部110は、ルール改良部111の指示に応じてルールデータベース部105にデータベースの修正を指示する。ソースコード読み込み部112は、開発者119が作成又は修正した人手修正ソースコード120を入力として、計算機処理が容易なデータに変換し、再生成ソースコード情報128又は修正ソースコード情報129として出力する。ソースコード設計意図抽出部113は、修正ソースコード情報129又は再生成ソースコード情報128とソースコードに含まれる開発者の設計意図を抽出するためのルールを格納したソースコード設計意図抽出ルール情報126を入力として、ソースコードに含まれる設計意図のデータであるソースコード設計意図情報130を出力する。ソフトウェアモデル生成部114は、修正ソースコード情報129又は再生成ソースコード情報128と、ソースコード設計意図情報130と、ソフトウェアモデルを生成するためのルールを格納したソフトウェアモデル生成ルール情報127とを入力として、人手修正ソースコード120又は再生成ソースコード118に対応する生成ソフトウェアモデル116を出力する。
 図2は、ソフトウェアモデル読み込み部102の処理フローを示す。ソフトウェアモデル読み込み部102は、開発者131が作成した初期ソフトウェアモデル115又は生成ソフトウェアモデル116を入力として、図形的なソフトウェアモデルの記述を計算機処理が容易なデータに変換し、初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122として出力する処理を行う。まず、開発者131により記述された初期ソフトウェアモデル115又は生成ソフトウェアモデル116を読み込む(201)。次に要素IDを0にする(202)。次にソフトウェアモデルに記述された全ての記述要素について繰り返しを開始する(203)。次に要素IDの値を1増やす(204)。次にソフトウェアモデル情報を出力するために記述要素の記述内容を分析する(205)。次にステップ205での分析結果を初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122として出力する(206)。次にステップ204に戻って繰り返し処理を行う。ステップ207は、ステップ203の繰り返し処理の終了位置を示す。
 図3は、図2のソフトウェアモデル読み込み部102の処理フロー中のステップ205で呼び出される記述要素の記述内容分析サブルーチンの処理フローを示す。まず、現在処理対象の記述要素のステレオタイプを読み取る(301)。次に現在処理対象の記述要素の名前ラベルを読み取る(302)。次に現在処理対象の記述要素の記述位置を判定する(303)。次に現在処理対象の記述要素に接続している他の記述要素を走査する(304)。
 図4は、図3の記述要素の記述内容分析サブルーチンからステップ303で呼び出される記述位置判定サブルーチンの処理フローを示す。まず、記述位置判定対象要素の上下方向の記述位置はどこかを判定する(401)。上1/3以上の位置に記述されていた場合には更に左右方向の記述位置を判定する(402)。左右方向1/3以上左側に記述されていた場合には位置を「上左部」に設定する(404)。中央に記述されていた場合には位置を「上中央部」に設定する(405)。左右方向1/3以上右側に記述されていた場合には位置を「上右部」に設定する(406)。ステップ401の判定で下1/3以下の位置に記述されていた場合には更に左右方向の記述位置を判定する(403)。左右方向1/3以上左側に記述されていた場合には位置を「下左部」に設定する(407)。中央に記述されていた場合には位置を「下中央部」に設定する(408)。左右方向1/3以上右側に記述されていた場合には位置を「下右部」に設定する(409)。ステップ401の判定で上下1/3以上の位置に記述されていない場合は更に左右方向の記述位置を判定する(410)。左右方向1/3以上左側に記述されていた場合には位置を「中央左部」に設定する(411)。中央に記述されていた場合には位置を「中心部」に設定する(412)。左右方向1/3以上右側に記述されていた場合には位置を「中央右部」に設定する(413)。
 図5は、図3の記述要素の記述内容分析サブルーチンからステップ304で呼び出される接続要素走査サブルーチンの処理フローを示す。まず、接続先リスト中の要素IDを0にする(501)。次に接続先リスト中の接続方向を「なし」にする(502)。次に被接続先リスト中の要素IDを0にする(503)。次に被接続先リスト中の接続方向を「なし」にする(504)。次に現在処理対象の記述要素に接続があるかどうか判定する(505)。接続がない場合には終了する。接続がある場合には全ての接続について繰り返しを開始する(506)。次に接続線がどの方向に接続されているかを判定する(507)。接続線が出る方向に接続されている場合には、接続先要素リスト中の要素IDに接続先要素IDを追加する(508)。次に接続先要素リスト中の接続方向に接続線接続辺の位置を追加する(509)。ステップ507の判定において接続線が入る方向に接続されている場合には、被接続先要素リスト中の要素IDに接続元要素IDを追加する(510)。次に被接続先要素リスト中の接続方向に接続線接続辺の位置を追加する(511)。次にステップ507に戻って繰り返し処理を行う。ステップ512は、ステップ506の繰り返し処理の終了位置を示す。
 図6は、ソースコード生成部104の処理フローを示す。ソースコード生成部104は初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122と、ソフトウェアモデル設計意図情報123と、ソースコードを生成するためのルールを格納したソースコード生成ルール情報125とを入力として、初期ソフトウェアモデル115に対応する初期生成ソースコード117、又は生成ソフトウェアモデル116に対応する再生成ソースコード118を出力する処理を行う。まず、初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122を読み込む(601)。次にソフトウェアモデル設計意図情報123を読み込む(602)。次に、ソースコード生成ルール情報125を読み込む(603)。次に初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122に含まれる全ての要素IDについて繰り返しを開始する(604)。次にソフトウェアモデル設計意図情報123から現在の要素IDに対応するコード生成ルールIDを読み込む(605)。次に、ソフトウェアモデル設計意図情報123から現在の要素IDに対応する設計意図IDを読み込む(606)。次にソースコード生成ルール情報125からコード生成ルールID及び設計意図IDに該当する生成コードテンプレートを読み込む(607)。次に初期ソフトウェアモデル情報121又は生成ソフトウェアモデル122から現在の要素IDに対応する名前ラベルを読み込む(608)。次に生成コードテンプレート中の「[name]」タグ位置を名前ラベルで置き換える(609)。次に、初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122から現在の要素IDに対応する接続先要素リストを読み込む(610)。次に接続先要素リスト中の全ての接続先について繰り返しを開始する(611)。次に初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122から接続先要素IDに対応する名前ラベルを読み込む(612)。次に生成コードテンプレート中の「[reference]」又は「[calls]」のタグ位置を名前ラベルで置き換える(613)。次にステップ612に戻って繰り返し処理を行う。ステップ614は、ステップ611の繰り返し処理の終了位置を示す。次に生成コードテンプレート中に「[body]」タグがあるかどうか判定する(615)。「[body]」タグがある場合には生成コードテンプレート中の「[body]」タグ位置を「本体部」コメントで置き換える(616)。次にステップ604に戻って繰り返し処理を行う。ステップ617は、ステップ604の繰り返し処理の終了位置を示す。
 図7は、ソフトウェアモデル設計意図抽出部103の処理フローを示す。ソフトウェアモデル設計意図抽出部103は、初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122と、ソフトウェアモデルに含まれる開発者の設計意図を抽出するためのルールを格納したソフトウェアモデル設計意図抽出ルール情報124とを入力として、ソフトウェアモデルに含まれる設計意図のデータであるソフトウェアモデル設計意図情報123を出力する。まず、初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122を読み込む(701)。次にソフトウェアモデル設計意図抽出ルール情報124を読み込む(702)。次に初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122に含まれる全ての要素IDについて繰り返しを開始する(703)。次に現在処理中の要素IDについて接続パターン分析を行う(704)。次に設計意図に一致するソフトウェアモデル記述があるかどうかの判定フラグであるマッチフラグを0にする(705)。次に全てのソフトウェアモデル設計意図抽出ルール情報124について繰り返しを開始する(706)。次にソフトウェアモデルの記述が設計意図に一致するかどうかの設計意図マッチングを行う(707)。次にステップ707に戻って繰り返し処理を行う。ステップ708は、ステップ706の繰り返し処理の終了位置を示す。
 次に、マッチフラグが0より大であるかどうか判定する(709)。0より大でない場合には該当の要素IDをソフトウェアモデル設計意図情報123に出力する(718)。次にコード生成ルールIDの規定値をソフトウェアモデル設計意図情報123に出力する(719)。次に設計意図IDの規定値をソフトウェアモデル設計意図情報123に出力する(720)。ステップ709の判定でマッチフラグが0より大であった場合にはマッチフラグが1であるかどうかの判定を行う(710)。マッチフラグが1でない場合には該当要素IDをソフトウェアモデル設計意図情報123に出力する(715)。次にマッチしたソフトウェアモデル設計意図抽出ルール情報124の中で最も優先度の高いルールのコード生成IDをソフトウェアモデル設計意図情報123に出力する(716)。次にマッチしたソフトウェアモデル設計意図抽出ルール情報124の中で最も優先度の高いルールの設計意図IDをソフトウェアモデル設計意図情報123に出力する(717)。ステップ710の判定でマッチフラグが1であった場合には該当要素IDをソフトウェアモデル設計意図情報123に出力する(711)。次にマッチしたソフトウェアモデル設計意図抽出ルール情報124のコード生成IDをソフトウェアモデル設計意図情報123に出力する(712)。次にマッチしたソフトウェアモデル設計意図抽出ルール情報124の設計意図IDをソフトウェアモデル設計意図情報123に出力する(713)。次にマッチしたソフトウェアモデル設計意図抽出ルール情報124の優先度を1増やす(714)。次にステップ704に戻って繰り返し処理を行う。ステップ721は、ステップ703の繰り返し処理の終了位置を示す。
 図8は、図7のソフトウェアモデル設計意図抽出部103の処理フローからステップ704で呼び出される接続パターン分析サブルーチンの処理フローを示す。まず、接続数、被接続数、平均接続距離、最大接続距離、最小接続距離、平均被接続距離、最大被接続距離、最小被接続距離、合計接続距離、合計被接続距離をそれぞれ0にする(801)。次に接続方向リストを空にする(802)。次に該当要素IDの接続先要素リストを読み込む(803)。次に全ての接続先について繰り返しを開始する(804)。次に接続数を1増やす(805)。次に接続先要素との接続距離を算出する(806)。次に接続距離値を更新する(807)。次に接続方向リストに該当接続先の接続方向を追加する(808)。次にステップ804に戻って繰り返し処理を行う。ステップ809は、ステップ804の繰り返し処理の終了位置を示す。次に、全ての被接続先について繰り返し処理を開始する(810)。次に被接続数を1増やす(811)。次に被接続先要素との接続距離を算出する(812)。次に被接続先距離の値を更新する(813)。次に接続方向リストに該当被接続先の接続方向を追加する(814)。次にステップ811に戻って繰り返し処理を行う。ステップ815は、ステップ810の繰り返し処理の終了位置を示す。
 図9は、図8の接続パターン分析サブルーチンからステップ806で呼び出される接続先要素との接続距離算出サブルーチンの処理フローを示す。まず、接続先要素の座標を得る(901)。次に現在の処理対象要素の座標を得る(902)。次にX1に処理対象要素の横軸座標、Y1に処理対象要素の縦軸座標を設定する(903)。次にX2に接続先要素の横軸座標、Y2に接続先要素の縦軸座標を設定する(904)。次に|X2-X1|+|Y2-Y1|を距離とする(905)。
 図10は、図8の接続パターン分析サブルーチンからステップ812で呼び出される被接続先要素との接続距離算出サブルーチンの処理フローを示す。まず、被接続先要素の座標を得る(1001)。次に現在の処理対象要素の座標を得る(1002)。次にX1に処理対象要素の横軸座標、Y1に処理対象要素の縦軸座標を設定する(1003)。次にX2に被接続先要素の横軸座標、Y2に被接続先要素の縦軸座標を設定する(1004)。次に|X2-X1|+|Y2-Y1|を距離とする(1005)。
 図11は、図8の接続パターン分析サブルーチンからステップ807で呼び出される接続距離値更新サブルーチンのフローを示す。まず合計接続距離に該当接続先との距離を加算する(1101)。次に平均接続距離に合計接続距離を接続数で割った値を設定する(1102)。次に該当接続先との距離が最小接続距離より小さいかどうか判定する(1103)。該当接続先との距離が最小接続距離より小さくない場合にはステップ1105に進む。該当接続先との距離が最小接続距離より小さい場合には最小接続距離に該当接続先との距離を設定する(1104)。次に該当接続先との距離が最大接続距離より大きいかどうか判定する(1105)。該当接続先との距離が最大接続距離より大きくない場合には終了する。該当接続先との距離が最大接続距離より大きい場合には最大接続距離に該当接続先との距離を設定する(1106)。
 図12は、図8の接続パターン分析サブルーチンからステップ813で呼び出される被接続距離値更新サブルーチンの処理フローを示す。まず合計被接続距離に該当被接続先との距離を加算する(1201)。次に平均被接続距離に合計被接続距離を被接続数で割った値を設定する(1202)。次に該当被接続先との距離が最小被接続距離より小さいかどうか判定する(1203)。該当被接続先との距離が最小被接続距離より小さくない場合にはステップ1205に進む。該当被接続先との距離が最小被接続距離より小さい場合には最小被接続距離に該当被接続先との距離を設定する(1204)。次に該当被接続先との距離が最大被接続距離より大きいかどうか判定する(1205)。該当被接続先との距離が最大被接続距離より大きくない場合には終了する。該当被接続先との距離が最大被接続距離より大きい場合には最大被接続距離に該当被接続先との距離を設定する(1206)。
 図13は、図7のソフトウェアモデル設計意図抽出部103の処理フローからステップ707で呼び出される設計意図マッチングサブルーチンの処理フローを示す。まず、タイプ一致重み値、記述位置一致重み値、接続パターン一致重み値をそれぞれ読み込む(1301)。次に一致閾値を読み込む(1302)。次に一致尤度に0を設定する(1303)。次にタイプが一致するかどうか判定する(1304)。タイプが一致しない場合にはステップ1306に進む。タイプが一致する場合には一致尤度にタイプ一致重み値を加算する(1305)。次に記述位置が一致するかどうか判定する(1306)。記述位置が一致しない場合にはステップ1308に進む。記述位置が一致する場合には一致尤度に記述位置一致重み値を加算する(1307)。次に接続パターンが一致するかどうか判定する(1308)。接続パターンが一致しない場合にはステップ1310に進む。接続パターンが一致する場合には一致尤度に接続パターン一致重み値を加算する(1309)。次に一致尤度が一致閾値以上かどうかを判定する(1310)。一致尤度が一致閾値より小さい場合には終了する。一致尤度が一致閾値より大きいか等しい場合にはマッチフラグの値を1増やす(1311)。
 図14は、データベース更新管理部110の処理フローを示す。データベース更新管理部110は、ルール改良部111の指示に応じてルールデータベース部105にデータベースの修正を指示する。まず、データベース修正指示を受け取る(1401)。次にソースコード設計意図抽出ルールの修正指示かどうかを判定する(1402)。ソースコード設計意図抽出ルールの修正指示でない場合にはステップ1403に進む。ソースコード設計意図抽出ルールの修正指示である場合にはソースコード設計意図抽出ルールデータベース108を修正する(1408)。次にソフトウェアモデル設計意図抽出ルールの修正指示かどうかを判定する(1403)。ソフトウェアモデル設計意図抽出ルールの修正指示でない場合にはステップ1404に進む。ソフトウェアモデル設計意図抽出ルールの修正指示である場合にはソフトウェアモデル設計意図抽出ルールデータベース107を修正する(1407)。次にソースコード生成ルールの修正指示かどうかを判定する(1404)。ソースコード生成ルールの修正指示でない場合にはソフトウェアモデル生成ルールデータベース106を修正する(1405)。ソースコード生成ルールの修正指示である場合にはソースコード生成ルールデータベース109を修正する(1406)。
 図15は、ソースコード設計意図抽出部113の処理フローを示す。ソースコード設計意図抽出部113は、修正ソースコード情報129又は再生成ソースコード情報128と、ソースコードに含まれる開発者の設計意図を抽出するためのルールを格納したソースコード設計意図抽出ルール情報126とを入力として、ソースコードに含まれる設計意図のデータであるソースコード設計意図情報130を出力する。まず、修正ソースコード情報129又は再生成ソースコード情報128を読み込む(1501)。次にソースコード設計意図抽出ルール情報126を読み込む(1502)。次に読み込んだソースコード情報に含まれる全てのブロックIDについて繰り返し処理を開始する(1503)。次にブロック間のつながりを表す関連のパターンについて分析する(1504)。次にブロックの記述特性について分析・設定を行う(1505)。次に設計意図に一致するかどうかのマッチフラグを0にする(1506)。次に全てのソースコード設計意図抽出ルール情報126について繰り返し処理を開始する(1507)。次に設計意図と処理対象のブロックが一致するかどうかの設計意図マッチングを行う(1508)。次にステップ1508に戻って繰り返し処理を行う。ステップ1509は、ステップ1507の繰り返し処理の終了位置を示す。
 次に、マッチフラグが0より大かどうか判定する(1510)。マッチフラグが0より大でない場合には該当ブロックIDをソースコード設計意図情報130に出力する(1519)。次にソフトウェアモデル生成ルールIDの規定値をソースコード設計意図情報130に出力する(1520)。次に設計意図IDの規定値をソースコード設計意図情報130に出力する(1521)。次にステップ1504に戻って繰り返し処理を行う。ステップ1522は、ステップ1503の繰り返し処理の終了位置を示す。ステップ1510の判定でマッチフラグが0より大である場合にはマッチフラグが1であるかどうか判定する(1511)。マッチフラグが1でない場合には、該当ブロックIDをソースコード設計意図情報130に出力する(1516)。次にマッチしたソースコード設計意図抽出ルール情報126の中で最も優先度の高いルールのコード生成IDをソースコード設計意図情報130に出力する(1517)。次にマッチしたソースコード設計意図抽出ルール情報126の中で最も優先度の高いルールの設計意図IDをソースコード設計意図情報130に出力する(1518)。次にステップ1504に戻って繰り返し処理を行う。ステップ1522は、ステップ1503の繰り返し処理の終了位置を示す。ステップ1511の判定でマッチフラグが1である場合には該当ブロックIDをソースコード設計意図情報130に出力する(1512)。次にマッチしたソースコード設計意図抽出ルール情報126のソフトウェアモデル生成IDをソースコード設計意図情報130に出力する(1513)。次にマッチしたソースコード設計意図抽出ルール情報126の設計意図IDをソースコード設計意図情報130に出力する(1514)。次にマッチしたソースコード設計意図抽出ルール情報126の優先度を1増やす(1515)。次にステップ1504に戻って繰り返し処理を行う。ステップ1522は、ステップ1503の繰り返し処理の終了位置を示す。
 図16は、図15のソースコード設計意図抽出部113の処理フローからステップ1504で呼び出される関連パターン分析サブルーチンの処理フローを示す。まず、関連数、合計関連距離、平均関連距離、最大関連距離、最小関連距離、方向値をゼロにする。また関連種別、関連方向を空にする(1601)。次に該当ブロックIDの関連リストを読み込む(1602)。次に該当ブロックIDの関連リスト中に含まれる全ての関連先について繰り返し処理を開始する(1603)。次に関連数を1増やす(1604)。次に関連先ブロックとの距離を算出する(1605)。次に距離値を更新する(1606)。次に関連方向を更新する(1607)。次に関連種別を設定する(1608)。次にステップ1604に戻って繰り返し処理を行う。ステップ1609は、ステップ1603の繰り返し処理の終了位置を示す。
 図17は、図16の関連パターン分析サブルーチンからステップ1605で呼び出される関連先ブロックとの距離算出サブルーチンの処理フローを示す。まず、関連先ブロックIDに対応するレコードを読み込む(1701)。次に対応するブロックIDのレコードの開始行をL1に設定する(1702)。次に現在処理中のブロックIDのレコードの終了行をL2に設定する(1703)。次に|L1-L2|を距離として算出する(1704)。
 図18は、図16の関連パターン分析サブルーチンからステップ1606で呼び出される距離値更新サブルーチンの処理フローを示す。まず合計関連距離に該当関連先との距離を加算する(1801)。次に平均接続距離に合計接続距離を接続数で割った値を設定する(1802)。次に該当関連先との距離が最小関連距離より小さいかどうか判定する(1803)。該当関連先との距離が最小関連距離より小さくない場合はステップ1805に進む。該当関連先との距離が最小関連距離より小さい場合には最小関連距離に該当関連先との距離を設定する(1804)。次に該当関連先との距離が最大関連距離より大きいかどうか判定する(1805)。該当関連先との距離が最大関連距離より大きくない場合には終了する。該当関連先との距離が最大関連距離より大きい場合には最大関連距離に該当関連先との距離を設定する(1806)。
 図19は、図16の関連パターン分析サブルーチンからステップ1607で呼び出される関連方向更新サブルーチンの処理フローを示す。まず、関連先ブロックIDに対応するレコードを読み込む(1901)。次に対応するブロックIDの開始行をDに設定する(1902)。次に現在処理中のブロックIDの開始行をSに設定する(1903)。次にD-Sが0より大かどうかを判定する(1904)。D-Sが0より大の場合には方向値を1増加させる(1905)。ステップ1904の判定においてD-Sが0より大でない場合には方向値を1減少させる(1908)。次に方向値が0より大かどうか判定する(1906)。方向値が0より大の場合には関連方向に後方優位を設定する(1907)。ステップ1906の判定で方向値が0より大でない場合には関連方向に前方優位を設定する(1909)。
 図20は、図16の関連パターン分析サブルーチンからステップ1608で呼び出される関連種別設定サブルーチンの処理フローを示す。まず、処理中の関連項目から関連種別を読み込む(2001)。次に関連種別テーブルから該当する関連種別の関連種別IDを得る(2002)。次に関連種別リストに関連種別IDを追加する(2003)。
 図21は、図15のソースコード設計意図抽出部113の処理フローからステップ1505で呼び出される記述特性分析・設定サブルーチンの処理フローを示す。まず、現在処理中のブロックの開始行をSに設定する(2101)。次に現在処理中のブロックの終了行をEに設定する(2102)。次に関連数÷(E-S)の値を記述特性に設定する(2103)。
 図22は、図15のソースコード設計意図抽出部113の処理フローからステップ1508で呼び出される設計意図マッチングサブルーチンの処理フローを示す。まず、タイプ一致重み値、記述特性一致重み値、関連パターン一致重み値をそれぞれ読み込む(2201)。次に一致閾値を読み込む(2202)。次に一致尤度に0を設定する(2203)。次にタイプが一致するかどうか判定する(2204)。タイプが一致しない場合にはステップ2206に進む。タイプが一致する場合には一致尤度にタイプ一致重み値を加算する(2205)。次に記述特性が一致するかどうか判定する(2206)。記述特性が一致しない場合にはステップ2208に進む。記述特性が一致する場合には一致尤度に記述特性一致重み値を加算する(2207)。次に関連パターンが一致するかどうか判定する(2208)。関連パターンが一致しない場合にはステップ2210に進む。関連パターンが一致する場合には一致尤度に関連パターン一致重み値を加算する(2209)。次に一致尤度が一致閾値以上かどうかを判定する(2210)。一致尤度が一致閾値より小さい場合には終了する。一致尤度が一致閾値より大きいか等しい場合にはマッチフラグの値を1増やす(2211)。
 図23は、ルール改良部111の処理フローを示す。ルール改良部111は初期ソフトウェアモデル情報121、生成ソフトウェアモデル情報122、ソフトウェアモデル設計意図情報123、ソフトウェアモデル設計意図抽出ルール情報124、ソースコード生成ルール情報125、修正ソースコード情報129、再生成ソースコード情報128、ソフトウェアモデル生成ルール情報127、ソースコード設計意図抽出ルール情報126、ソースコード設計意図情報130を入力として、データベース変更管理部110にデータベース変更指示を行う。まず、ブロック差分リスト、要素差分リスト、関連記述リストを空にする。また追加ルールID、対象ブロックID、対象要素IDを0にする。また要素ID算出フラグ、ブロックID算出フラグをNGに設定する(2301)。次に修正ソースコード情報129を読み込む(2302)。次に再生成ソースコード情報128を読み込む(2303)。次に人手修正ソースコード120を読み込む(2304)。次に再生成ソースコード118を読み込む(2305)。次に各ソースコード情報の差分からブロックの差分を抽出する(2306)。次に抽出したブロックの差分があるかどうかを判定する(2307)。ブロックの差分がある場合にはソースコード生成ルール情報125にルールを追加する(2308)。ステップ2307の判定においてブロックの差分がない場合にはテキスト処理により各ソースコードの差分を抽出する(2309)。次に全てのソースコードの差分について繰り返し処理を開始する(2310)。次にブロック内部の差分かどうかを判定する(2311)。ブロック内部の差分でない場合にはステップ2310に戻って繰り返し処理を継続する。ステップ2317は、ステップ2310の繰り返し処理の終了位置を示す。ブロック内部の差分である場合には関連記述を抽出する(2312)。次に差分が属するブロックを特定して該当ブロックが記述される要素IDを算出する(2313)。次に要素ID算出フラグがOKかどうかを判定する(2314)。要素ID算出フラグがOKでない場合にはステップ2310に戻って繰り返し処理を継続する。ステップ2317は、ステップ2310の繰り返し処理の終了位置を示す。要素ID算出フラグがOKである場合には生成コードテンプレートを修正する(2315)。次にソフトウェアモデル設計意図抽出ルール情報を追加する(2316)。次にステップ2310に戻って繰り返し処理を継続する。ステップ2317は、ステップ2310の繰り返し処理の終了位置を示す。
 次に、初期ソフトウェアモデル情報121を読み込む(2318)。次に生成ソフトウェアモデル情報122を読み込む(2319)。次にソフトウェアモデル情報に含まれる要素の差分を抽出する(2320)。次に抽出した差分により追加された要素があるかどうかを判定する(2321)。追加された要素がある場合にはソフトウェアモデル生成ルール情報127にルールを追加してステップ2323に進む(2322)。ステップ2321の判定において追加された要素がない場合には接続先の差分を抽出する(2323)。次に全ての接続先差分について繰り返し処理を開始する(2324)。次に接続先の差分があるかどうかを判定する(2325)。接続先の差分がない場合にはステップ2324に戻って繰り返し処理を継続する。ステップ2330は、ステップ2324の繰り返し処理の終了位置を示す。接続先の差分がある場合には要素IDを特定してブロックIDを算出する(2326)。次にブロックID算出フラグがOKかどうかを判定する(2327)。ブロックID算出フラグがOKでない場合にはステップ2324に戻って繰り返し処理を継続する。ステップ2330は、ステップ2324の繰り返し処理の終了位置を示す。ステップ2327の判定においてブロックID算出フラグがOKである場合には生成ソフトウェアモデルテンプレートを修正する(2328)。次にソースコード設計意図抽出ルール情報を追加する(2329)。次にステップ2324に戻って繰り返し処理を継続する。ステップ2330は、ステップ2324の繰り返し処理の終了位置を示す。
 図24は、図23のルール改良部111の処理フローからステップ2306で呼び出されるソースコード情報の差分からブロックの差分を抽出するサブルーチンの処理フローを示す。まず、修正ソースコード情報129に含まれる全てのブロック名について繰り返し処理を開始する(2401)。次に修正ソースコード情報のブロック名を取得する(2402)。次に再生成ソースコード情報128中に含まれる全てのブロック名について繰り返し処理を開始する(2403)。次に再生成ソースコード情報128のブロック名を取得する(2404)。次に各ブロック名が一致するかどうかの判定を行う(2405)。ブロック名が一致しない場合にはブロック差分リストに該当ブロックのソースコード情報を追加する(2406)。次にステップ2403に戻って繰り返し処理を継続する。ステップ2407は、ステップ2403の繰り返し処理の終了位置を示す。ステップ2405の判定においてブロック名が一致する場合には、ステップ2406を実行せずにステップ2403に戻って繰り返し処理を継続する。ステップ2407は、ステップ2403の繰り返し処理の終了位置を示す。次にステップ2401に戻って繰り返し処理を継続する。ステップ2408は、ステップ2401の繰り返し処理の終了位置を示す。
 図25は、図23のルール改良部111の処理フローからステップ2308で呼び出されるソースコード生成ルール情報にルールを追加するサブルーチンの処理フローを示す。まず、追加ルールIDにソースコード生成ルール情報の最大コード生成ルールIDを設定する(2501)。次にブロック差分リストの全ての要素について繰り返し処理を開始する(2502)。次に追加ルールIDを1増やす(2503)。次に新規のコード生成ルールレコードを作成する(2504)。次に新規レコードのコード生成ルールIDに追加ルールIDを設定する(2505)。次に新規レコードの設計意図IDを1にする(2506)。次に現在処理中の差分ブロックIDに対応するソースコードを人手修正ソースコード120から取得する(2507)。次に関連記述を抽出する(2508)。次に抽出した関連記述を関連の種類に応じたタグに変換する(2509)。次に関連以外の記述を[body]タグで置き換える(2510)。次にブロックシグネチャを追加して生成コードテンプレートに設定する(2511)。次に設定済みの新規レコードをデータベース更新管理部110に通知しソースコード生成ルール情報に追加する(2512)。次にステップ2502に戻って繰り返しを継続する。ステップ2513は、ステップ2502の繰り返し処理の終了位置を示す。
 図26は、図23のルール改良部111の処理フローからステップ2312で呼び出される関連記述を抽出するサブルーチンの処理フローを示す。まず、抽出対象ソースコードの各行について繰り返し処理を開始する(2601)。次に抽出対象行を読み込む(2602)。次に読み込んだ対象行が関連記述であるかどうかを判定する(2603)。読み込んだ対象行が関連記述でない場合にはステップ2601に戻って繰り返し処理を継続する。ステップ2605は、ステップ2601の繰り返し処理の終了位置を示す。ステップ2603の判定において読み込んだ対象行が関連記述であった場合には、関連記述リストに関連記述部分を追加する(2604)。次にステップ2601に戻って繰り返し処理を継続する。ステップ2605は、ステップ2601の繰り返し処理の終了位置を示す。なお、図25中のステップ2508でも、図26の関連記述を抽出するサブルーチンが呼び出される。
 図27は、図23のルール改良部111の処理フローからステップ2313で呼び出されるブロック特定して要素IDを算出するサブルーチンの処理フローを示す。まず対象ブロック名を空にする(2701)。次に現在処理中の差分行の行番号をLに設定する(2702)。次に修正ソースコード情報129の全てのブロックIDについて繰り返し処理を開始する(2703)。次に現在処理中のブロックIDの開始行をSに設定する(2704)。次に現在処理中のブロックIDの終了行をEに設定する(2705)。次にS<L<Eであるかどうかを判定する(2706)。ステップ2706の判定においてS<L<Eでない場合にはステップ2703に戻って繰り返し処理を継続する。ステップ2714は、ステップ2703の繰り返し処理の終了位置を示す。ステップ2706の判定においてS<L<Eである場合には現在処理中のブロックIDに対応するブロック名を対象ブロック名に設定する(2707)。次に生成ソフトウェアモデル情報122の全ての要素IDについて繰り返し処理を開始する(2708)。次に現在の要素IDに対応する名前ラベルを取得する(2709)。次に対象ブロック名と名前ラベルが一致するかどうかを判定する(2710)。名前ラベルが一致しない場合にはステップ2708に戻って繰り返し処理を継続する。ステップ2711は、ステップ2708の繰り返し処理の終了位置を示す。ステップ2710の判定において名前ラベルが一致する場合には現在の要素IDを対象要素IDに設定する(2712)。次に要素ID算出フラグにOKを設定して終了する(2713)。
 図28は、図23のルール改良部111の処理フローからステップ2315で呼び出される生成コードテンプレート修正サブルーチンの処理フローを示す。まずソフトウェアモデル設計意図情報123を読み込む(2801)。次に対象要素IDに対応するコード生成ルールIDと設計意図IDを取得する(2802)。次にソースコード生成ルール情報125を読み込む(2803)。次にコード生成ルールIDと設計意図IDに対応する生成コードテンプレートを取得する(2804)。次に修正ソースコード情報129の対象ブロックIDに対応するレコードを取得する(2805)。次に修正ソースコード情報129の対象ブロックIDに対応する開始行と終了行を得る(2806)。次に修正ソースコードから開始行から終了行のソースコードを取得する(2807)。次に関連記述を抽出する(2808)。次に抽出した関連記述を関連の種類に応じたタグに変換する(2809)。次に関連以外の記述を[body]タグで置き換える(2810)。次にブロックシグネチャを追加して対応する生成コードテンプレートを置き換える(2811)。なお、図28中のステップ2808でも、図26の関連記述を抽出するサブルーチンが呼び出される。
 図29は、図23のルール改良部111の処理フローからステップ2316で呼び出されるソフトウェアモデル設計意図抽出ルール情報追加サブルーチンの処理フローを示す。まず新規のソフトウェアモデル設計意図抽出ルール情報レコードを作成する(2901)。次に修正ソフトウェアモデル情報を読み込む(2902)。次に修正ソフトウェアモデル情報の対象要素IDに対応するタイプを新規レコードのタイプに設定する(2903)。次に新規レコードの記述位置、接続パターンに規定値を設定する(2904)。次に一致閾値、優先度に規定値を設定する(2905)。次に全ての一致重みに規定値を設定する(2906)。次にコード生成ルールIDに生成コードテンプレート修正過程で得たコード生成ルールIDを設定する(2907)。次に設計意図IDに生成コードテンプレート修正過程で得た設計意図IDを設定する(2908)。
 図30は、図23のルール改良部111の処理フローからステップ2320で呼び出されるソフトウェアモデル情報の要素の差分を抽出するサブルーチンの処理フローを示す。まず初期ソフトウェアモデル情報121中の全ての名前ラベルについて繰り返し処理を開始する(3001)。次に初期ソフトウェアモデル情報121の名前ラベルを取得する(3002)。次に生成ソフトウェアモデル情報122中の全ての名前ラベルについて繰り返し処理を開始する(3003)。次に生成ソフトウェアモデル情報122の名前ラベルを取得する(3004)。次に名前ラベルが一致するかどうか判定を行う(3005)。名前ラベルが一致しない場合には要素差分リストに該当要素のソフトウェアモデル情報を追加する(3006)。次にステップ3003に戻って繰り返し処理を継続する。ステップ3007は、ステップ3003の繰り返し処理の終了位置を示す。ステップ3005の判定において名前ラベルが一致する場合にはステップ3006を実行せずにステップ3003に戻って繰り返し処理を継続する。ステップ3007は、ステップ3003の繰り返し処理の終了位置を示す。ステップ3008は、ステップ3001の繰り返し処理の終了位置を示す。
 図31は、図23のルール改良部111の処理フローからステップ2322で呼び出される、ソフトウェアモデル生成ルール情報にルールを追加するサブルーチンの処理フローを示す。まずソフトウェアモデル生成ルール情報127の最大ソフトウェアモデル生成ルールIDを追加ルールIDに設定する(3101)。次に要素差分リストの全ての要素について繰り返し処理を開始する(3102)。次に追加ルールIDを1増やす(3103)。次に新規のソフトウェアモデル生成ルールレコードを作成する(3104)。次に新規レコードのソフトウェアモデル生成ルールIDに追加ルールIDを設定する(3105)。次に新規レコードの設計意図IDを1にする(3106)。次に現在処理中の差分要素IDに対応するモデル要素をソフトウェアモデルから取得する(3107)。次にモデル要素の名前ラベルを[name]タグに置き換える(3108)。次に接続先要素の名前ラベルを規定値の[callee]タグに置き換える(3109)。次に設定済みの新規レコードをデータベース更新管理部110に通知しソフトウェアモデル生成ルール情報に追加する(3110)。ステップ3111は、ステップ3102の繰り返し処理の終了位置を示す。
 図32は、図23のルール改良部111の処理フローからステップ2326で呼び出される要素ID特定してブロックIDを算出するサブルーチンの処理フローを示す。まず接続先の差分が含まれる要素IDを取得する(3201)。次に現在処理中の要素IDに対応する名前ラベルを対象名前ラベルに設定する(3202)。次に修正ソースコード情報129の全てのブロックIDについて繰り返し処理を開始する(3203)。次に現在のブロックIDに対応するブロック名を取得する(3204)。次に対象名前ラベルとブロック名が一致するかどうか判定する(3205)。対象名前ラベルとブロック名が一致しない場合にはステップ3203に戻って繰り返し処理を継続する。ステップ3206は、ステップ3203の繰り返し処理の終了位置を示す。ステップ3205の判定において対象名前ラベルとブロック名が一致する場合は、現在のブロックIDを対象ブロックIDに設定する(3207)。次にブロックID算出フラグをOKに設定する(3208)。
 図33は、図23のルール改良部111の処理フローからステップ2328で呼び出される生成ソフトウェアモデルテンプレート修正サブルーチンの処理フローを示す。まずソースコード設計意図情報130を読み込む(3301)。次に対象ブロックIDに対応するソフトウェアモデル生成ルールIDと設計意図IDを取得する(3302)。次にソフトウェアモデル生成ルール情報127を読み込む(3303)。次にソフトウェアモデル生成ルールIDと設計意図IDに対応する生成ソフトウェアモデルテンプレートを取得する(3304)。次に生成ソフトウェアモデル情報122の対象要素IDに対応するレコードを取得する(3305)。次に生成ソフトウェアモデル情報122の対象要素IDに対応するモデル要素を生成ソフトウェアモデルから得る(3306)。次に各要素のラベルをタグに置き換える(3307)。次に生成ソフトウェアモデルテンプレートを置き換える(3308)。
 図34は、図23のルール改良部111の処理フローからステップ2329で呼び出されるソースコード設計意図抽出ルール情報追加サブルーチンの処理フローを示す。まず新規のソースコード設計意図抽出ルール情報レコードを作成する(3401)。次に再生成ソースコード情報128を読み込む(3402)。次に再生成ソースコード情報128の対象ブロックIDに対応するタイプを新規レコードのタイプに設定する(3403)。次に新規レコードの記述特性、関連パターンに規定値を設定する(3404)。次に一致閾値、優先度に規定値を設定する(3405)。次に全ての一致重みに規定値を設定する(3406)。次にソフトウェアモデル生成ルールIDに生成ソースコードテンプレート修正過程で得たソフトウェアモデル生成ルールIDを設定する(3407)。次に設計意図IDに生成ソースコードテンプレート修正過程で得た設計意図IDを設定する(3408)。
 図35は、ソースコード読み込み部112の処理フローを示す。ソースコード読み込み部112は、開発者119が作成又は修正した人手修正ソースコード120を入力として、計算機処理が容易なデータに変換し再生成ソースコード情報128又は修正ソースコード情報129として出力する。まず、ブロック内フラグをOFFにする(3501)。次に全てのソースコード行について繰り返し処理を開始する(3502)。次に次の行を読み込む(3503)。次にブロック内フラグがONかどうか判定する(3504)。ブロック内フラグがONでない場合にはブロック開始要素かどうか判定する(3505)。ブロック開始要素でない場合にはステップ3502に戻って繰り返し処理を継続する。ステップ3515は、ステップ3502の繰り返し処理の終了位置を示す。ステップ3505の判定においてブロック開始要素であった場合には、ブロック内フラグをONにする(3506)。次にブロックIDを1増やす(3507)。次に1ブロック分の空のソースコード情報レコードを作成する(3508)。次に作成したソースコード情報レコードにブロックIDを設定する(3509)。次にブロック名を読み取る(3510)。次にブロック名レコードにブロック名を設定する(3511)。次にタイプを読み取る(3512)。次にタイプ名レコードにタイプ名を設定する(3513)。現在の行数を開始行に設定する(3514)。次にステップ3502に戻って繰り返しを継続する。ステップ3515は、ステップ3502の繰り返し処理の終了位置を示す。ステップ3504の判定においてブロック内フラグがONである場合、関連記述かどうかを判定する(3517)。関連記述でない場合にはブロック終了要素かどうかを判定する(3523)。ブロック終了要素でない場合にはステップ3502に戻って繰り返しを継続する。ステップ3515は、ステップ3502の繰り返し処理の終了位置を示す。ステップ3523の判定においてブロック終了要素である場合には、現在の行数を終了行に設定する(3524)。次にブロック内フラグをOFFにする(3525)。次にステップ3502に戻って繰り返しを継続する。ステップ3515は、ステップ3502の繰り返し処理の終了位置を示す。ステップ3517の判定において関連記述である場合には、現在の処理対象レコードの関連リストに新規関連項目を追加する(3518)。次に関連種別を読み取る(3519)。次に現在の処理対象新規関連項目に関連種別を設定する(3520)。次に関連の名前ラベルを読み取る(3521)。次に現在の処理対象新規関連項目の関連先IDに関連の名前ラベルを仮設定して(3522)、ステップ3523へ移行する。最後に、ステップ3515に続いて、関連リスト内の関連先ID設定処理を実行する(3516)。
 図36は、図35のソースコード読み込み部112の処理フローからステップ3516で呼び出される関連リスト内の関連先ID設定処理サブルーチンの処理フローを示す。まず全てのブロックIDについて繰り返し処理を開始する(3601)。次に対象ブロックの関連リストを読み込む(3602)。次に関連リスト中の全ての関連項目について繰り返し処理を開始する(3603)。次に対象関連項目の関連先IDを読み込む(3604)。次に関連先IDは名前ラベルかどうかを判定する(3605)。関連先IDが名前ラベルでない場合にはステップ3603に戻って繰り返し処理を継続する。ステップ3611は、ステップ3603の繰り返し処理の終了位置を示す。ステップ3605の判定において関連先IDが名前ラベルである場合には、全てのブロックIDについて繰り返し処理を開始する(3606)。次に対象ブロックのブロックIDを読み込む(3607)。次に対象ブロックのブロック名と名前ラベルが一致するかどうか判定する(3608)。対象ブロックのブロック名と名前ラベルが一致しない場合にはステップ3606に戻って繰り返し処理を継続する。ステップ3609は、ステップ3606の繰り返し処理の終了位置を示す。ステップ3608の判定処理において対象ブロックのブロック名と名前ラベルが一致する場合には、対象関連項目の関連先IDを該当ブロックIDで置き換える(3610)。次にステップ3603に戻って繰り返し処理を継続する。ステップ3611は、ステップ3603の繰り返し処理の終了位置を示す。またステップ3612は、ステップ3601の繰り返し処理の終了位置を示す。
 図37は、初期ソフトウェアモデル情報121又は生成ソフトウェアモデル情報122として利用されるソフトウェアモデル情報を示す。ソフトウェアモデル情報121,122は、ソフトウェアモデルに含まれる要素の通し番号である要素ID3701と、要素に付けられた名前である名前ラベル3702と、要素の記述タイプであるタイプ3703と、要素が記述されている位置を表す記述位置3704と、各要素の他要素とのつながりを表す接続先要素リスト3707と、各要素の他要素からのつながりを表す被接続先要素リスト3708とからなる。接続先要素リスト3707は、接続先の要素を表す要素ID3705と、接続の向きを表す接続方向3706とからなる。被接続先要素リスト3708は、他の要素から接続されている接続元の要素を表す要素ID3717と、接続方向そのものを表す接続方向3718とからなる。なお、接続先又は被接続先が存在しない場合には各欄には0が格納される。一例として要素IDが「n」であり、名前ラベルが「dd_lib」であり、タイプが「関数」であり、記述位置が「下右部」であり、接続先要素リストの要素IDが「0」であり、接続先要素リストの接続方向が「なし」であり、被接続先要素リストの要素IDが「2」であり、被接続先要素リストの接続方向が「上」である場合を示す。
 図38は、ソフトウェアモデル設計意図情報123を示す。ソフトウェアモデル設計意図情報123は、ソフトウェアモデルに記述された要素を識別する要素ID3801と、コード生成ルールを識別するコード生成ルールID3802と、設計意図のデータを識別する設計意図ID3803とからなる。一例として要素IDが「n」であり、コード生成ルールIDが「6」であり、設計意図IDが「1」である場合を示す。
 図39は、ソフトウェアモデル設計意図抽出ルール情報124を示す。ソフトウェアモデル設計意図抽出ルール情報124は、ソフトウェアモデルに記述された要素のタイプを示すタイプ3901と、ソフトウェアモデルに記述された要素の記述位置を示す記述位置3903と、ソフトウェアモデルに記述された要素の接続のパターンを定量化した接続パターン3906と、ソフトウェアモデル設計意図抽出ルールに一致すると判定するための閾値である一致閾値3915と、同様のルールが複数一致した場合の優先度を示す優先度3916と、コード生成ルールを識別するコード生成ルールID3917と、設計意図を識別する設計意図ID3918とからなる。接続パターン3906は、該当要素が他要素に接続する数を示す接続数3905と、該当要素が他要素から接続される数を示す被接続数3907と、各接続の距離を示す接続距離3912と、要素間の接続方向を示す接続方向3913とからなる。接続距離3912は、接続の方向3908に応じてIN3919とOUT3920との2フィールドを持ち、それぞれ平均接続距離(AVE)3909と、最小接続距離(MIN)3910と、最大接続距離(MAX)3911とからなる。また、タイプ3901と、記述位置3903と、接続パターン3906とは、それぞれ一致判定をする場合の条件の重み付けのための一致重み3902,3904,3914を持つ。一例としてタイプが「関数」であり、タイプの一致重み値が「7」であり、記述位置が「左中央部」であり、記述位置の一致重み値が「1」であり、接続パターンの接続数が「2」であり、被接続数が「4」であり、接続距離のうち入方向(IN)の平均距離が「1.3」であり、最小値が「1」であり、最大値が「2」であり、出方向(OUT)の平均距離が「2.5」であり、最小値が「2」であり、最大値が「3」であり、接続方向が「下」であり、接続パターンの一致重み値が「2」であり、一致閾値が「29」であり、優先度が「2」であり、コード生成ルールIDが「5」であり、設計意図IDが「8」である場合を示す。
 図40は、ソースコード生成ルール情報125を示す。ソースコード生成ルール情報125は、ソフトウェアモデルに記述された要素をソースコードに変換するための情報を格納したテーブルである。ソースコード生成ルール情報125は、コード生成のルールを識別するコード生成ルールID4001と、同じコード生成ルールの中でも開発者の設計意図の違いによって生じる生成コードの違いを識別する設計意図ID4002と、ソースコードとして出力するコードのテンプレートを格納した生成コードテンプレート4003とからなる。一例としてコード生成IDが「1」であり、設計意図IDが「1」であり、生成コードテンプレートが「class [name]{[reference][body]}」4006である場合を示す。
 図41は、再生成ソースコード情報128又は修正ソースコード情報129として利用されるソースコード情報を示す。ソースコード情報128,129は、ソースコード中のブロックを識別する番号を表すブロックID4101と、例えば関数名のようなブロックに付けられた名前を表す名前ラベル4102と、ブロックの種類を表すタイプ4103と、ソースコード中でのブロックの記述位置を示す記述位置4106と、各ブロックと他ブロックとの関連を列挙する関連リスト4109とからなる。記述位置4106は、ブロックの開始行を表す開始行4104と、ブロックの終了行を表す終了行4105とからなる。関連リスト4109は、関連先ブロックの種別を表す関連種別4107と、関連先ブロックを識別するブロックIDである関連先ブロックID4108とからなる。なお、関連するブロックがない場合は、関連リスト中の関連種別4107は「なし」、関連先ブロックID4108は「0」をそれぞれ設定する。一例としてブロックIDが「n」であり、名前ラベルが「dd_drv」であり、タイプが「関数」であり、記述位置の開始行が「9788」であり、記述位置の終了行が「9901」であり、関連リストの関連種別が「なし」であり、関連リストの関連先ブロックIDが「0」である場合を示す。
 図42は、ソースコード設計意図情報130を示す。ソースコード設計意図情報130は、ソースコードに記述されたブロックを識別するためのブロックID4201と、ソースコードのブロックに対応してソフトウェアモデルの生成ルールを識別するソフトウェアモデル生成ルールID4202と、設計意図のデータを識別する設計意図ID4203とからなる。一例としてブロックIDが「n」であり、ソフトウェアモデル生成ルールIDが「6」であり、設計意図IDが「1」である場合を示す。
 図43は、ソースコード設計意図抽出ルール情報126を示す。ソースコード設計意図抽出ルール情報126は、ソースコードに記述されたブロックの種別を識別するタイプ4301と、ソースコードに記述されたブロックの記述の特徴を表す記述特性4303と、ブロックと他のブロックとの間の関連のパターンを表す関連パターン4305と、ソースコード設計意図抽出ルールに一致すると判定するための閾値である一致閾値4314と、同様のルールが複数一致した場合の優先度を示す優先度4315と、ソフトウェアモデル生成ルールを識別するソフトウェアモデル生成ルールID4316と、設計意図を識別する設計意図ID4317とからなる。関連パターン4305は、該当ブロックが他ブロックに関連する数を表す関連数4306と、各関連の距離を示す距離4307と、ブロック間の関連がソースコード上で前後方向どちらにより強く関連するのかを示す関連方向4311と、各関連の種類を図44に示す関連種別情報テーブルを用いて数値に変換しリストとした関連種別4312とからなる。関連パターン4305の距離4307は、距離の平均値(AVE)4308と、距離の最小値(MIN)4309と、距離の最大値(MAX)4310とからなる。また、タイプ4301と、記述特性4303と、関連パターン4305とは、それぞれ一致判定をする場合の条件の重み付けのための一致重み4302,4304,4313を持つ。一例としてタイプが「クラス」であり、タイプの一致重み値が「7」であり、記述特性が「0.6」であり、記述特性の一致重み値が「1」であり、関連パターンの関連数が「4」であり、関連パターンの距離の平均値が「1.3」であり、関連パターンの距離の最小値が「1」であり、関連パターンの距離の最大値が「2」であり、関連パターンの関連方向が「前方優位」であり、関連パターンの関連種別が「17,17,17,17」であり、関連パターンの一致重み値が「2」であり、一致閾値が「29」であり、優先度が「2」であり、ソフトウェアモデル生成ルールIDが「5」であり、設計意図IDが「8」である場合を示す。
 図44は、ソースコード設計意図抽出ルール情報126に利用する関連種別情報テーブルを示す。関連種別情報テーブルは、関連種別を識別する関連種別ID4401と、関連種別そのものを表す関連種別4402とからなる。一例として関連種別IDが「n」であり、関連種別が「包含」である場合を示す。
 図45は、ソフトウェアモデル生成ルール情報127を示す。ソフトウェアモデル生成ルール情報127は、ソースコードに記述されたブロックをソフトウェアモデルに変換するための情報を格納したテーブルであって、ソフトウェアモデル生成ルールを識別するソフトウェアモデル生成ルールID4501と、同じソフトウェアモデル生成ルールの中でも開発者の設計意図の違いによって生じる生成ソフトウェアモデルの違いを識別する設計意図ID4502と、ソフトウェアモデルとして出力するソフトウェアモデルのテンプレートを格納した生成ソフトウェアモデルテンプレート4503とからなる。一例としてソフトウェアモデル生成ルールIDが「1」であり、設計意図IDが「1」であり、生成ソフトウェアモデルテンプレートが図に示す図形(4506)である場合を示す。
 図46は、ソフトウェアモデル生成部114の処理フローを示す。ソフトウェアモデル生成部114は、修正ソースコード情報129又は再生成ソースコード情報128と、ソースコード設計意図情報130と、ソフトウェアモデルを生成するためのルールを格納したソフトウェアモデル生成ルール情報127とを入力として人手修正ソースコード120又は再生成ソースコード118に対応する生成ソフトウェアモデル116を出力する。
 まず、ソースコード情報128,129を読み込む(4601)。次にソースコード設計意図情報130を読み込む(4602)。次にソフトウェアモデル生成ルール情報127を読み込む(4603)。次に全てのブロックIDについて繰り返し処理を開始する(4604)。次にソースコード設計意図情報130から現在のブロックIDに対応するソフトウェアモデル生成ルールIDを読み込む(4605)。次にソースコード設計意図情報130から現在のブロックIDに対応する設計意図IDを読み込む(4606)。次にソフトウェアモデル生成ルール情報127からルールID/設計意図IDに該当する生成ソフトウェアモデルテンプレートを読み込む(4607)。次にソースコード情報128,129から現在のブロックIDに対応するブロック名を読み込む(4608)。次に生成ソフトウェアテンプレート中の「[name]」タグ位置をブロック名で置き換えたブロックを描画する(4609)。次にソースコード情報128,129から現在のブロックIDに対応する関連リストを読み込む(4610)。次に関連リスト中の接続先について繰り返し処理を開始する(4611)。次にソースコード情報128,129から関連先ブロックIDに対応するブロック名を読み込む(4612)。次にすでに該当ブロック名に相当するモデルが描画されているかどうかを判定する(4613)。すでに該当ブロック名に相当するモデルが描画されている場合には、描画中モデルの中から該当ブロック名に相当するブロックを検索する(4614)。次に生成ソフトウェアモデルテンプレート中のモデル図形に従って関連先ブロックの空き接続口を選択する(4615)。次に描画済み関連先ブロックの空き接続口に現在のブロックから関連線を接続する(4616)。次にステップ4611に戻って繰り返し処理を継続する。ステップ4617は、ステップ4611の繰り返し処理の終了位置を示す。ステップ4613の判定において未だ該当ブロック名に相当するモデルが描画されていない場合には生成ソフトウェアモデルテンプレート中の「[Ref]」又は「[callee]」タグ位置を名前ラベルで置き換えたブロックを描画する(4619)。次に生成ソフトウェアモデルテンプレート中のモデル図形に従った接続線を追加する(4620)。次にステップ4611に戻って繰り返し処理を継続する。ステップ4617は、ステップ4611の繰り返し処理の終了位置を示す。またステップ4618は、ステップ4604の繰り返し処理の終了位置を示す。
 図47は、ソフトウェアモデルの例を示す。4701はソフトウェアモデルの全体枠である。4702はソフトウェアモデルに描画される一要素である。一例としてここではステレオタイプが「module」、名前ラベルが「GUI_io」であり、他要素である「proc_ctrl」と接続ポート4703を介して接続線4704でつながっている。また要素GUI_ioは左上部の記述位置である。
 なお、本実施の形態で例示したソフトウェアモデルはUMLを基準としてソフトウェアモデルであるものとしたが、他の図的表現を用いるソフトウェアモデルも利用可能である。また生成されるソースコードはC言語又はC++言語であるとしたが、他のプログラミング言語に置き換えても同様の実施が可能である。
 図48は、上記本発明の実施の形態におけるソフトウェア開発支援ツール101に加えて入出力部を備えたシステムの構成図である。ここでは、開発者131が入力部4801を通して直接コンピュータシステムにソフトウェアモデルを入力し、自動生成されたソースコードをディスプレイ装置(表示部)4802に表示する場合の構成を示す。また、開発者119が入力部4804を通して直接コンピュータシステムにソースコードを入力し、自動生成されたソフトウェアモデルをディスプレイ装置(表示部)4803に表示することもできる。なお、ディスプレイ装置4802,4803に代わりプリンタを用いた紙出力、音声合成による読み上げ出力などを用いてもよい。また入力部4801,4804に代わり、ドキュメントスキャナ、画像データ入力などを用いてもよい。
 本発明は、既存のソースコードからソフトウェアモデルを自動的に生成することで、大規模なソースコードからでもソフトウェア開発者の設計意図を含んだソフトウェアモデルを容易に得ることができ、ソフトウェアモデルを中心としたソフトウェア開発を行うことにより、ソフトウェアの生産性に寄与するソフトウェア開発支援ツールとして、広くソフトウェア設計一般に利用することができる。
101 ソフトウェア開発支援ツール
102 ソフトウェアモデル読み込み部
103 ソフトウェアモデル設計意図抽出部
104 ソースコード生成部
105 ルールデータベース部
106 ソフトウェアモデル生成ルールデータベース
107 ソフトウェアモデル設計意図抽出ルールデータベース
108 ソースコード設計意図抽出ルールデータベース
109 ソースコード生成ルールデータベース
110 データベース更新管理部
111 ルール改良部
112 ソースコード読み込み部
113 ソースコード設計意図抽出部
114 ソフトウェアモデル生成部
115 初期ソフトウェアモデル
116 生成ソフトウェアモデル
117 初期生成ソースコード
118 再生成ソースコード
119 開発者
120 人手修正ソースコード
121 初期ソフトウェアモデル情報
122 生成ソフトウェアモデル情報
123 ソフトウェアモデル設計意図情報
124 ソフトウェアモデル設計意図抽出ルール情報
125 ソースコード生成ルール情報
126 ソースコード設計意図抽出ルール情報
127 ソフトウェアモデル生成ルール情報
128 再生成ソースコード情報
129 修正ソースコード情報
130 ソースコード設計意図情報
131 開発者
3701 要素ID
3702 名前ラベル
3703 タイプ
3704 記述位置
3705 要素ID
3706 接続方向
3707 接続先要素リスト
3708 被接続先要素リスト
3801 要素ID
3802 コード生成ルールID
3803 設計意図ID
3901 タイプ
3902 タイプ一致重み
3903 記述位置
3904 記述位置一致重み
3905 接続数
3906 接続パターン
3907 被接続数
3908 方向
3909 AVE
3910 MIN
3911 MAX
3912 接続距離
3913 接続方向
3914 接続パターン一致重み
3915 一致閾値
3916 優先度
3917 コード生成ルールID
3918 設計意図ID
3919 IN
3920 OUT
4001 コード生成ルールID
4002 設計意図ID
4003 生成コードテンプレート
4101 ブロックID
4102 名前ラベル
4103 タイプ
4104 開始行
4105 終了行
4106 記述位置
4107 関連種別
4108 関連先ブロックID
4109 関連リスト
4201 ブロックID
4202 ソフトウェアモデル生成ルールID
4203 設計意図ID
4301 タイプ
4302 タイプ一致重み
4303 記述特性
4304 記述特性一致重み
4305 関連パターン
4306 関連数
4307 距離
4308 AVE
4309 MIN
4310 MAX
4311 関連方向
4312 関連種別
4313 関連パターン一致重み
4314 一致閾値
4315 優先度
4316 ソフトウェアモデル生成ルールID
4317 設計意図ID
4401 関連種別ID
4402 関連種別
4501 ソフトウェアモデル生成ルールID
4502 設計意図ID
4503 生成ソフトウェアモデルテンプレート
4701 ソフトウェアモデルの全体枠
4702 ソフトウェアモデルに描画される一要素
4703 接続ポート
4704 接続線
4801 入力部
4802 表示部
4803 表示部
4804 入力部

Claims (30)

  1.  開発者によって記述されたソフトウェアモデルを入力としてソースコードの自動生成に必要な情報をソフトウェアモデル情報として出力するソフトウェアモデル読み込み部と、
     前記ソフトウェアモデル情報とソフトウェアモデルに記述された開発者の設計意図を抽出するためのルールを記述したソフトウェアモデル設計意図抽出ルール情報とを入力としてソフトウェアモデルに記述された開発者の設計意図を抽出しソフトウェアモデル設計意図情報として出力するソフトウェアモデル設計意図抽出部と、
     前記ソフトウェアモデル情報と前記ソフトウェアモデル設計意図情報とソフトウェアモデルからソースコードを生成するためのルールを記述したソースコード生成ルール情報とを入力としてソースコードを出力するソースコード生成部とを備えたことを特徴とするソフトウェア開発支援ツール。
  2.  開発者によって記述されたソースコードを入力としてソフトウェアモデルの自動生成に必要な情報をソースコード情報として出力するソースコード読み込み部と、
     前記ソースコード情報とソースコードに記述された開発者の設計意図を抽出するためのルールを記述したソースコード設計意図抽出ルール情報とを入力としてソースコードに記述された開発者の設計意図を抽出しソースコード設計意図情報として出力するソースコード設計意図抽出部と、
     前記ソースコード情報と前記ソースコード設計意図情報とソースコードからソフトウェアモデルを生成するためのルールを記述したソフトウェアモデル生成ルール情報とを入力としてソフトウェアモデルを出力するソフトウェアモデル生成部とを備えたことを特徴とするソフトウェア開発支援ツール。
  3.  請求項1に記載のソフトウェア開発支援ツールにおいて、
     ソースコードを入力としてソフトウェアモデルの自動生成に必要な情報をソースコード情報として出力するソースコード読み込み部と、
     前記ソースコード情報とソースコードに記述された開発者の設計意図を抽出するためのルールを記述したソースコード設計意図抽出ルール情報とを入力としてソースコードに記述された開発者の設計意図を抽出しソースコード設計意図情報として出力するソースコード設計意図抽出部と、
     前記ソースコード情報と前記ソースコード設計意図情報とソースコードからソフトウェアモデルを生成するためのルールを記述したソフトウェアモデル生成ルール情報とを入力としてソフトウェアモデルを出力するソフトウェアモデル生成部とを更に備えたことを特徴とするソフトウェア開発支援ツール。
  4.  請求項3に記載のソフトウェア開発支援ツールにおいて、
     前記ソフトウェアモデル生成ルール情報と前記ソフトウェアモデル設計意図抽出ルール情報と前記ソースコード生成ルール情報と前記ソースコード設計意図抽出ルール情報とをデータベースに蓄積して管理するルールデータベース部と、
     前記ルールデータベース部の内容更新を管理するデータベース更新管理部と、
     前記ソフトウェアモデル情報と前記ソフトウェアモデル生成ルール情報と前記ソフトウェアモデル設計意図抽出ルール情報と前記ソフトウェアモデル設計意図情報と前記ソースコード情報と前記ソースコード生成ルール情報と前記ソースコード設計意図抽出ルール情報と前記ソースコード設計意図情報とを入力として前記ソフトウェアモデル生成ルール情報と前記ソフトウェアモデル設計意図抽出ルール情報と前記ソースコード生成ルール情報と前記ソースコード設計意図抽出ルール情報とを開発者の意図を反映するよう修正するための指示を前記データベース更新管理部に指示するルール改良部とを更に備えたことを特徴とするソフトウェア開発支援ツール。
  5.  請求項1に記載のソフトウェア開発支援ツールにおいて、
     前記ソフトウェアモデル情報としてソフトウェアモデルの特徴を表現するために要素IDと名前ラベルとタイプと記述位置と接続先要素リストと被接続先要素リストとを備えたことを特徴とするソフトウェア開発支援ツール。
  6.  請求項1に記載のソフトウェア開発支援ツールにおいて、
     前記ソフトウェアモデル設計意図情報としてソフトウェアモデルに記述されている要素と開発者の設計意図とを関連付けするために要素IDとコード生成ルールIDと設計意図IDとを備えたことを特徴とするソフトウェア開発支援ツール。
  7.  請求項1に記載のソフトウェア開発支援ツールにおいて、
     前記ソフトウェアモデル設計意図抽出ルール情報として開発者の設計意図を特徴付けるためにタイプと記述位置と接続パターンと一致閾値と優先度とコード生成ルールIDと設計意図IDとを備えたことを特徴とするソフトウェア開発支援ツール。
  8.  請求項1に記載のソフトウェア開発支援ツールにおいて、
     前記ソースコード生成ルール情報として開発者の設計意図を反映したソースコードを生成するための情報を格納するためにコード生成ルールIDと設計意図IDと生成コードテンプレートとを備えたことを特徴とするソフトウェア開発支援ツール。
  9.  請求項7に記載のソフトウェア開発支援ツールにおいて、
     前記ソフトウェアモデル設計意図抽出部は、前記ソフトウェアモデル情報として表現されるソフトウェアモデルに記述された要素のタイプと前記要素の記述位置と前記要素間の接続パターンとを用いて前記ソフトウェアモデル設計意図抽出ルール情報と一致するかどうかを判定することを特徴とするソフトウェア開発支援ツール。
  10.  請求項7に記載のソフトウェア開発支援ツールにおいて、
     前記ソフトウェアモデル設計意図抽出ルール情報の前記タイプと前記記述位置と前記接続パターンとに一致重み値を持ち、
     前記ソフトウェアモデル設計意図抽出部は、開発者の設計意図に一致するソフトウェアモデル設計意図情報を検索するための一致判定の際に前記タイプと前記記述位置と前記接続パターンとの一致判定に重み付けをした判定をすることにより、設計者の開発意図を反映しやすい設計意図を抽出することを特徴とするソフトウェア開発支援ツール。
  11.  請求項2に記載のソフトウェア開発支援ツールにおいて、
     前記ソースコード情報としてソースコードの特徴を表現するためにブロックIDと名前ラベルとタイプと記述位置と関連リストとを備えたことを特徴とするソフトウェア開発支援ツール。
  12.  請求項2に記載のソフトウェア開発支援ツールにおいて、
     前記ソースコード設計意図情報としてソースコードに記述されているブロックと開発者の設計意図とを関連付けするためブロックIDとソフトウェアモデル生成ルールIDと設計意図IDとを備えたことを特徴とするソフトウェア開発支援ツール。
  13.  請求項2に記載のソフトウェア開発支援ツールにおいて、
     前記ソースコード設計意図抽出ルール情報として開発者の記述意図を特徴付けるためタイプと記述特性と関連パターンと一致閾値と優先度とソフトウェアモデル生成ルールIDと設計意図IDとを備えたことを特徴とするソフトウェア開発支援ツール。
  14.  請求項2に記載のソフトウェア開発支援ツールにおいて、
     前記ソフトウェアモデル生成ルール情報として開発者の記述意図を反映したソフトウェアモデルを生成するためソフトウェアモデル生成ルールIDと設計意図IDと生成ソフトウェアモデルテンプレートとを備えたことを特徴とするソフトウェア開発支援ツール。
  15.  請求項13に記載のソフトウェア開発支援ツールにおいて、
     前記ソースコード設計意図抽出部は、前記ソースコード情報として表現されるソースコードに記述されたブロックのタイプと前記ブロックの記述特性と前記ブロック間の関連パターンとを用いて前記ソースコード設計意図抽出ルール情報と一致するかどうかを判定することを特徴とするソフトウェア開発支援ツール。
  16.  請求項15に記載のソフトウェア開発支援ツールにおいて、
     前記ソースコード設計意図抽出部は、前記ソースコード設計意図抽出ルール情報と一致するかどうかを判定する前記記述特性を、前記ブロックの開始行と前記ブロックの終了行と前記ブロックの関連数から求めることを特徴とするソフトウェア開発支援ツール。
  17.  請求項13に記載のソフトウェア開発支援ツールにおいて、
     前記ソースコード設計意図抽出ルール情報の前記タイプと前記記述特性と前記関連パターンとに一致重み値を持ち、
     前記ソースコード設計意図抽出部は、開発者の設計意図に一致するソースコード設計意図情報を検索するための一致判定の際に前記タイプと前記記述特性と前記関連パターンとの一致判定に重み付けをした判定をすることにより、設計者の開発意図を反映しやすい設計意図を抽出することを特徴とするソフトウェア開発支援ツール。
  18.  請求項3に記載のソフトウェア開発支援ツールにおいて、
     前記ソフトウェアモデルの代わりに開発者が最初に開発するソフトウェアモデルを初期ソフトウェアモデルとして入力し、前記ソフトウェア開発支援ツールによって出力される前記ソースコードを初期生成ソースコードとし、前記初期生成ソースコードを開発者の手によって修正した人手修正ソースコードを前記ソフトウェア開発支援ツールの前記ソースコード入力として前記ソフトウェアモデルの代わりに生成ソフトウェアモデルを出力することを特徴とするソフトウェア開発支援ツール。
  19.  請求項18に記載のソフトウェア開発支援ツールにおいて、
     前記初期ソフトウェアモデルと前記生成ソフトウェアモデルとを入力として再生成ソースコードを出力することにより、前記初期生成ソースコードより開発者の設計意図をより多く反映したソースコードを出力することを特徴とするソフトウェア開発支援ツール。
  20.  請求項19に記載のソフトウェア開発支援ツールにおいて、
     前記再生成ソースコードを入力として再度生成ソフトウェアモデルを自動生成することにより、開発者の設計意図をより多く反映することを特徴とするソフトウェア開発支援ツール。
  21.  請求項18に記載のソフトウェア開発支援ツールにおいて、
     前記初期ソフトウェアモデルを前記ソフトウェアモデル読み込み部の入力とし前記ソフトウェアモデル情報の代わりに初期ソフトウェアモデル情報を前記ソフトウェアモデル読み込み部が出力することにより、開発者による初期のソフトウェアモデルと自動生成によるソフトウェアモデルとを区別することを特徴とするソフトウェア開発支援ツール。
  22.  請求項19に記載のソフトウェア開発支援ツールにおいて、
     前記生成ソフトウェアモデルを前記ソフトウェアモデル読み込み部の入力とし前記ソフトウェアモデル情報の代わりに生成ソフトウェアモデル情報を前記ソフトウェアモデル読み込み部が出力することにより、自動生成によるソフトウェアモデルから更に前記再生成ソースコードを出力することを特徴とするソフトウェア開発支援ツール。
  23.  請求項18に記載のソフトウェア開発支援ツールにおいて、
     前記人手修正ソースコードを前記ソースコード読み込み部の入力とし前記ソースコード情報の代わりに修正ソースコード情報を前記ソースコード読み込み部が出力することにより、開発者による修正済みのソースコードと自動生成によるソースコードとを区別することを特徴とするソフトウェア開発支援ツール。
  24.  請求項19に記載のソフトウェア開発支援ツールにおいて、
     前記再生成ソースコードを前記ソースコード読み込み部の入力とし前記ソースコード情報の代わりに再生成ソースコード情報を前記ソースコード読み込み部が出力することにより、前記再生成ソースコードから更に前記生成ソフトウェアモデルを出力することを特徴とするソフトウェア開発支援ツール。
  25.  請求項4に記載のソフトウェア開発支援ツールにおいて、
     前記ルール改良部は、修正ソースコード情報と再生成ソースコード情報との差分から前記ソースコード生成ルール情報に新規のソースコード生成ルールを追加することを特徴とするソフトウェア開発支援ツール。
  26.  請求項4に記載のソフトウェア開発支援ツールにおいて、
     前記ルール改良部は、修正ソースコードと再生成ソースコードとの差分と修正ソースコード情報と再生成ソースコード情報とから前記ソースコード生成ルール情報の修正箇所を発見し、前記ソースコード生成ルール情報に含まれる生成ソースコードテンプレートを修正することを特徴とするソフトウェア開発支援ツール。
  27.  請求項4に記載のソフトウェア開発支援ツールにおいて、
     前記ルール改良部は、初期ソフトウェアモデル情報と生成ソフトウェアモデル情報との差分から前記ソフトウェアモデル生成ルール情報に新規のソフトウェアモデル生成ルールを追加することを特徴とするソフトウェア開発支援ツール。
  28.  請求項4に記載のソフトウェア開発支援ツールにおいて、
     前記ルール改良部は、初期ソフトウェアモデルと生成ソフトウェアモデルとに記述されている要素間の接続先の差分と初期ソフトウェアモデル情報と生成ソフトウェアモデル情報とから前記ソフトウェアモデル生成ルール情報の修正箇所を発見し、前記ソフトウェアモデル生成ルール情報に含まれる生成ソフトウェアモデルテンプレートを修正することを特徴とするソフトウェア開発支援ツール。
  29.  請求項1に記載のソフトウェア開発支援ツールと、
     開発者からのソフトウェアモデルを前記ソフトウェア開発支援ツールへ入力するための入力部と、
     前記ソースコード生成部によって生成されたソースコードを表示するための表示部とを備えたことを特徴とするソフトウェア開発支援システム。
  30.  請求項2に記載のソフトウェア開発支援ツールと、
     開発者からのソースコードを前記ソフトウェア開発支援ツールへ入力するための入力部と、
     前記ソフトウェアモデル生成部によって生成されたソフトウェアモデルを表示するための表示部とを備えたことを特徴とするソフトウェア開発支援システム。
PCT/JP2009/005161 2009-02-26 2009-10-05 ソフトウェア開発支援ツール WO2010097854A2 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2009801574922A CN102334095A (zh) 2009-02-26 2009-10-05 软件开发支持工具
US13/183,026 US20110271246A1 (en) 2009-02-26 2011-07-14 Software development support tool

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009-044687 2009-02-26
JP2009044687A JP2010198494A (ja) 2009-02-26 2009-02-26 ソフトウェア開発支援ツール

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/183,026 Continuation US20110271246A1 (en) 2009-02-26 2011-07-14 Software development support tool

Publications (1)

Publication Number Publication Date
WO2010097854A2 true WO2010097854A2 (ja) 2010-09-02

Family

ID=42666009

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/005161 WO2010097854A2 (ja) 2009-02-26 2009-10-05 ソフトウェア開発支援ツール

Country Status (4)

Country Link
US (1) US20110271246A1 (ja)
JP (1) JP2010198494A (ja)
CN (1) CN102334095A (ja)
WO (1) WO2010097854A2 (ja)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722435B (zh) * 2012-05-25 2015-04-08 浙江工商大学 一种从uml软件模型到排队网络模型的转换方法
US9361209B2 (en) * 2012-05-25 2016-06-07 International Business Machines Corporation Capturing domain validations and domain element initializations
US9223569B1 (en) * 2014-06-17 2015-12-29 International Business Machines Corporation Automatic software catalog content creation based on bio-inspired computing prediction
US9600244B1 (en) * 2015-12-09 2017-03-21 International Business Machines Corporation Cognitive editor
CN106933563B (zh) * 2015-12-31 2020-06-02 远光软件股份有限公司 一种页面流编辑器
US10048946B2 (en) * 2016-03-24 2018-08-14 Microsoft Technology Licensing, Llc Converting visual diagrams into code
JP6722528B2 (ja) * 2016-06-30 2020-07-15 クラリオン株式会社 ソフトウェア開発支援方法及びシステム
US11720330B2 (en) 2016-10-17 2023-08-08 Engineer.ai Corp. Application development involving instant protoyping
CN109976803B (zh) * 2017-12-27 2022-09-20 航天信息股份有限公司 一种文件的生成方法及装置
CN109375904A (zh) * 2018-09-26 2019-02-22 思朋网络科技(武汉)有限公司 一种基于模型的计算机软件开发方法
US10824538B2 (en) 2019-01-22 2020-11-03 Oracle International Corporation Scalable incremental analysis using caller and callee summaries
US11301223B2 (en) 2019-08-19 2022-04-12 International Business Machines Corporation Artificial intelligence enabled function logic infusion
CN110704298A (zh) * 2019-08-23 2020-01-17 北京奇艺世纪科技有限公司 一种代码验证的方法、装置、终端设备及存储介质
US11288055B2 (en) * 2020-02-18 2022-03-29 International Business Machines Corporation Model-based differencing to selectively generate and deploy images in a target computing environment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0944358A (ja) * 1995-08-02 1997-02-14 Toshiba Corp プログラム生成方法及びプログラム生成装置並びにオブジェクト生成方法及びオブジェクト生成装置
JP2007265418A (ja) * 2001-05-28 2007-10-11 Zenya Kono 自動詳細化システム
WO2007116490A1 (ja) * 2006-03-31 2007-10-18 Fujitsu Limited ソースコード生成プログラム、ソースコード生成方法およびソースコード生成装置
JP2008225898A (ja) * 2007-03-13 2008-09-25 Toshiba Corp 変換装置、変換プログラム及び変換方法
US20080228812A1 (en) * 2007-03-15 2008-09-18 Honeywell International Inc. Method and System for Metamodeling Using Dynamic Ontology Objects

Also Published As

Publication number Publication date
US20110271246A1 (en) 2011-11-03
JP2010198494A (ja) 2010-09-09
CN102334095A (zh) 2012-01-25

Similar Documents

Publication Publication Date Title
WO2010097854A2 (ja) ソフトウェア開発支援ツール
JP6881990B2 (ja) 画像処理装置とその制御方法、及びプログラム
CN106874244B (zh) 一种基于工作序列的文档自动生成模型的构建方法
CN108762743B (zh) 一种数据表操作代码生成方法及装置
EP2600258A2 (en) Systems and methods for extraction of concepts for reuse-based schema matching
JPWO2008093569A1 (ja) 情報抽出規則作成支援システム、情報抽出規則作成支援方法及び情報抽出規則作成支援プログラム
CN114547072A (zh) 自然语言查询转换sql方法、系统、设备及存储介质
US5970244A (en) Method of performing a reverse analysis of a program and its apparatus
JP2018136755A (ja) プログラム自動生成システム及びプログラム自動生成方法
JPH03111969A (ja) 計画作成支援方法
US8572551B2 (en) Difference log production for model merging
JP2013084023A (ja) 仕様作成支援装置、及び、プログラム
JP5041990B2 (ja) ソフトウェア部品抽出支援装置
CN112668293B (zh) 数据报表处理方法
JP2003241964A (ja) ソフトウエア保守資料生成装置および生成プログラム
JP2021064123A (ja) データ入力支援システム、データ入力支援方法、及びプログラム
JP2011076561A (ja) パーツカタログ作成支援装置、プログラム、およびパーツカタログ作成支援方法
JP2000029757A (ja) 情報管理装置および方法、記録媒体
EP1003097A2 (en) Method and apparatus for storing data as liquid information
JPH09330212A (ja) プログラミング言語処理システム
JP5600826B1 (ja) 非構造化データ処理システム、非構造化データ処理方法およびプログラム
JP2020098484A (ja) オントロジー作成装置、方法およびプログラム
JP6902513B2 (ja) ソースコード生成支援装置およびソースコード生成支援方法
WO2023100587A1 (ja) アノテーション装置及び方法
US20230350647A1 (en) Programming Aiding Apparatus and Programming Aiding Method

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980157492.2

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09840708

Country of ref document: EP

Kind code of ref document: A2

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09840708

Country of ref document: EP

Kind code of ref document: A1