WO2007116490A1 - ソースコード生成プログラム、ソースコード生成方法およびソースコード生成装置 - Google Patents

ソースコード生成プログラム、ソースコード生成方法およびソースコード生成装置 Download PDF

Info

Publication number
WO2007116490A1
WO2007116490A1 PCT/JP2006/306901 JP2006306901W WO2007116490A1 WO 2007116490 A1 WO2007116490 A1 WO 2007116490A1 JP 2006306901 W JP2006306901 W JP 2006306901W WO 2007116490 A1 WO2007116490 A1 WO 2007116490A1
Authority
WO
WIPO (PCT)
Prior art keywords
class
code
definition
source code
program
Prior art date
Application number
PCT/JP2006/306901
Other languages
English (en)
French (fr)
Inventor
Hiroshi Miyazaki
Original Assignee
Fujitsu Limited
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 Fujitsu Limited filed Critical Fujitsu Limited
Priority to PCT/JP2006/306901 priority Critical patent/WO2007116490A1/ja
Publication of WO2007116490A1 publication Critical patent/WO2007116490A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Definitions

  • Source code generation program source code generation method, and source code generation apparatus
  • the present invention relates to a source code generation program, a source code generation method, and a source code generation apparatus that generate a source code of a program, and in particular, a source code generation program and a source for generating a program source code from an object-oriented model
  • the present invention relates to a code generation method and a source code generation apparatus.
  • a model is a design drawing of software and is an abstract description of the structure and operation of software in a form that is easy to understand. By describing the model, developers can easily grasp the functions of the software to be developed. It also facilitates communication among multiple developers.
  • an object-oriented model description language is often used as a means for describing a model.
  • Object-oriented is a development method in which a class is defined as the smallest unit of software components and functions of the entire software are described by the relationship between the classes. Each class defines information on the types of data (attributes) that can be held by objects generated from the class and the processing (methods) that should be performed outside the object.
  • UML Unified Modeling Language
  • OMG Object Management Group
  • Patent Document 1 UML provides multiple types of diagrams, such as class diagrams that represent the static structure of classes and sequence diagrams that represent interactions between classes. The developer selects several figures from among them according to the contents described, and describes the model.
  • a development support tool that links the description of the model and the description of the source code is known. For example, when a developer describes a model, the development support tool generates source code corresponding to the model. When the developer changes the generated source code, the development support tool reflects the change in the model. By using such development support tools, the workload of developers is greatly reduced.
  • Model power As a guideline for generating source code, there is MDA (Model-Driven Architecture) proposed by OMG of the standardization organization (see Non-Patent Document 2).
  • Non-patent literature 1 Object Management Group ⁇ "Unined Modeling Language, [online], [March 20, 2006 search], Internet URL: http://www.omg.org/technology/do cuments / formal / uml .htm)
  • Non-Patent Document 2 Object Management Group ⁇ "MDA Guide Version 1.0.1", [online], [March 20, 2006 search], Internet URL: http://www.omg.org/docs/omg/ 03-0 6-01.pdl)
  • Non-Patent Document 2 has a problem in that it does not show a method for generating a source code including a model calculation concrete calculation procedure.
  • models are described abstractly in a form that is easy for developers to understand, so there is a lack of information on detailed calculation procedures.
  • conventional development support tools generate part of the source code and model power, and the detailed calculation procedure has been added manually by the developer. Therefore, developers still need to proceed with development while looking at both the model and the source code.
  • the present invention has been made in view of these points, and is based on an object-oriented model. It is an object of the present invention to provide a source code generation program, a source code generation method, and a source code generation device that generate a source code including a specific calculation procedure.
  • the source code generation program in order to solve the above problems, generates a source code including a specific calculation procedure from a class diagram and a sequence diagram having an additional description.
  • the computer 1 that executes the source code generation program has model storage means la, class definition generation means lb, method definition generation means lc, and class code generation means Id.
  • the model storage means la has a class diagram 2 that describes the attributes of the objects used in the program for each class and a constraint expression 3a that indicates the constraint conditions for the variables used in the program.
  • the sequence diagram 3 is stored.
  • the class definition generation means lb refers to the class diagram 2 stored in the model storage means la and declares a class declaration statement for declaring the class and class attributes for each class described in the class diagram 2.
  • a class definition code including an attribute declaration statement is generated.
  • the method definition generation means lc refers to the sequence diagram 3 stored in the model storage means la and applies the constraint expression 3a added to the method call relationship for each method call relationship described in the sequence diagram 3 to the program. Convert to a processing code indicating the processing contents and declare a method Generate a method definition code that includes a method declaration statement and the converted processing code.
  • Class code generation means Id refers to sequence diagram 3, classifies the method definition code generated by method definition generation means lc for each class to which the method belongs, and class definition code generated by class definition generation means lb. Are combined with all the method definition codes belonging to the class indicated by the class definition code, and the source codes 4a and 4b of the classes 2a and 2b are output.
  • the class definition generation means lb generates a class definition code including a class declaration statement and an attribute declaration statement for each of the classes 2a and 2b described in the class diagram 2. Generated.
  • the method definition generation means lc generates a method definition code including a method declaration statement and a processing code for each method call relationship described in the sequence diagram 3. Then, the class code generation means Id synthesizes the class definition code and the method definition code of the method belonging to the class, and the source code of class 2a, 2b 4a and 4b are output.
  • the class definition generation means assigns the attribute of the object used in the program for each class.
  • the class diagram described in is stored in the model storage means, and the class is declared for each class described in the class diagram with reference to the class diagram stored in the model storage means.
  • a class definition code including a declaration statement and an attribute declaration statement for declaring the attribute of the class is generated, and the method definition generation means indicates a constraint expression cursor indicating a constraint condition for variables used in the program.
  • the sequence diagram added to the call-up relationship is stored in the model storage means, and the sequence storage is stored in the model storage means.
  • the constraint expression added to the method call relationship is converted into a processing code indicating the processing contents of the program, and the method is converted.
  • a method definition code including a method declaration statement to be declared and the converted processing code is generated, and a class code generation unit refers to the sequence diagram and uses the method definition code generated by the method definition generation unit as a method.
  • the class definition code generated by the class definition generation unit and all the method definition codes belonging to the class indicated by the class definition code are combined to classify the class definition code.
  • a source code generation method characterized by outputting a source code is provided.
  • a class definition code including a class declaration statement and an attribute declaration statement is generated for each of the classes 2a and 2b described in the class diagram 2 based on the class diagram 2. Is done.
  • a method definition code including a method declaration statement and a processing code is generated for each method call relationship described in the sequence diagram 3. Then, the class definition code and the method definition code of the method belonging to the class are synthesized and the class source code is output.
  • a source code generation device that generates a source code of an object-oriented model power program
  • a class diagram in which attributes of objects used in the program are described for each class.
  • a sequence attached to the constraint expression call relationship that indicates the constraints on the variables used in the program.
  • a model storage means for storing a class diagram, a class declaration statement for declaring the class for each class described in the class diagram, with reference to the class diagram stored in the model storage means, and The method call described in the sequence diagram with reference to the sequence diagram stored in the model storage unit, and a class definition generation unit that generates a class definition code including an attribute declaration statement that declares an attribute of the class For each relationship, the constraint expression added to the method call relationship is converted into a processing code indicating the processing contents of the program, and a method definition including a method declaration statement for declaring a method and the converted processing code
  • Method definition generating means for generating code and the method generated by the method definition generating means with reference to the sequence diagram Classifying the definition code for each class to which the method belongs, and combining the class definition code generated by the class definition generation means and all the method definition codes belonging to the class indicated by the class definition code,
  • a source code generation device characterized by comprising class code generation means for outputting a source code of a class.
  • a processing code indicating the processing content executed by the method is generated from information added to the method call relationship in the sequence diagram. This eliminates the need for software developers to write source code directly and allows them to concentrate on the model description. In addition, since the constraint equation is used as information added to the model, the meaning of the model and ease of understanding are not harmed.
  • FIG. 1 is a principle view showing an invention applied to the embodiment.
  • FIG. 2 is a diagram showing a system configuration of the present embodiment.
  • FIG. 3 is a diagram showing a hardware configuration of a development computer.
  • FIG. 4 is a block diagram showing functions of a development computer.
  • Fig.5 An example of class diagram used for generating source code.
  • FIG. 6 An example of a sequence diagram used for generating source code.
  • FIG. 7 is a flowchart showing the procedure of class definition generation processing.
  • FIG. 8 is a flowchart showing the procedure of a method definition generation process.
  • FIG. 9 is a flowchart showing a procedure of class code generation processing.
  • FIG. 10 is a diagram illustrating an example of generating source code of a method call source.
  • FIG. 11 is a diagram illustrating an example of generating a source code of a method call destination.
  • FIG. 1 is a principle diagram showing the invention applied to the embodiment.
  • the program generator shown in Fig. 1 generates the source code of a program written in an object-oriented programming language from the class diagram and sequence diagram described by the developer.
  • the computer 1 has model storage means la, class definition generation means lb, method definition generation means lc, and class code generation means Id.
  • the model storage means la stores a class diagram 2 and a sequence diagram 3 described by the developer.
  • class diagram 2 a plurality of classes 2a and 2b constituting a program to be developed are described.
  • Each class defines attributes of objects used in the program. For example, for class 2a, attribute "al” and attribute "a2" are defined.
  • sequence diagram 3 describes the method call relationship between the objects generated from the classes 2a and 2b described in the class diagram 2.
  • Method call relationships are represented by arrows.
  • the call of the method “fl” from the class 2a object to the class 2b object is defined.
  • constraint formula 3a which shows the constraint conditions for variables used in the program, is powerful! ]
  • Class definition generation means lb is a class having a class declaration statement for declaring a class and an attribute declaration statement for declaring a class attribute for each class from class diagram 2 stored in model storage means la.
  • the class definition code contains static information about the class declaration. It is composed only of information and does not include information on calculation procedures.
  • the format of the generated class definition code follows the grammar of the programming language used in source code 4a and 4b.
  • the method definition generation unit lc generates a method definition code having a method declaration statement for declaring a method and a processing code for each method call from the sequence diagram 3 stored in the model storage unit la.
  • the processing code is a code including a specific calculation procedure of processing executed by the method.
  • the method definition generation means lc converts the constraint expression 3a added to the method call relationship so as to conform to the grammar of the programming language used in the source codes 4a and 4b, and generates a processing code.
  • the class code generation means Id first classifies the method definition code generated by the method definition generation means lc for each class to which the method belongs. Then, the class code generation means Id generates source codes 4a and 4b for each class by synthesizing the class definition code generated by the class definition generation means lb and the classified method definition code.
  • the generated source code 4a, 4b has static information on the declaration of the class and information on the method including the specific calculation procedure of processing.
  • the class definition generation means lb has the class declaration statement and the attribute declaration statement for each of the classes 2a and 2b included in the class diagram 2 described by the developer.
  • a class definition code is generated.
  • the method definition generation means lc generates a method definition code having a method declaration statement and a processing code for each method call relationship included in the sequence diagram 3 described by the developer.
  • the class code generation means Id synthesizes the class definition code and the method definition code of the method belonging to the class, and generates class source codes 4a and 4b.
  • source code including a specific calculation procedure of processing is generated from the class diagram and sequence diagram described by the developer. Therefore, developers do not have to write source code directly, and can concentrate on the description of the model. Even if the software function needs to be changed during development, the developer can reflect the change in the program simply by changing the class diagram and sequence diagram.
  • FIG. 2 is a diagram showing a system configuration of the present embodiment.
  • the development computer 100, the order processing server 200, and the database server 300 are connected to each other via the network 10.
  • the development computer 100 is a computer for a software developer to perform program creation work. In this embodiment, it is assumed that a developer develops a program that executes an ordering process with reference to a database. The developer uses the development computer 100 to describe a class diagram and a sequence diagram, and the generated class diagram, sequence diagram, and force also generate source code. The developer then converts the generated source code into an executable binary code and places it on the order processing server 200 via the network 10.
  • the order processing server 200 is an application server for executing a program for performing order processing.
  • the program that performs order processing proceeds while communicating with the database server 300 via the network 10.
  • the database server 300 includes a database made up of data related to product orders.
  • the database server 300 searches and updates data in response to a request from the order processing server 200.
  • the hardware configuration of the development computer 100, the order processing server 200, and the database server 300 will be described. However, since these computers can be realized by the same hardware configuration, the development computer 100 will be described as a representative.
  • FIG. 3 is a diagram illustrating a hardware configuration of the development computer.
  • the development computer 100 is entirely controlled by a CPU (Central Processing Unit) 101.
  • a random access memory (RAM) 102, a hard disk drive (HDD) 103, a graphic processing device 104, an input interface 105, and a communication interface 106 are connected to the CPU 101 via a bus 107.
  • RAM Central Processing Unit
  • HDD hard disk drive
  • a graphic processing device 104 an input interface 105
  • a communication interface 106 are connected to the CPU 101 via a bus 107.
  • the RAM 102 temporarily stores at least part of an OS program or application program to be executed by the CPU 101.
  • the RAM 102 stores various data necessary for processing by the CPU 101.
  • the HDD 103 stores an OS program and an application program.
  • a monitor 11 is connected to the graphics processing unit 104. ing.
  • the graphic processing device 104 displays an image on the screen of the monitor 11 according to a command from the CPU 101.
  • a keyboard 12 and a mouse 13 are connected to the input interface 105.
  • the input interface 105 transmits a signal sent from the keyboard 12 or the mouse 13 to the CPU 101 via the bus 107.
  • the communication interface 106 is connected to the network 10.
  • FIG. 4 is a block diagram illustrating functions of the development computer.
  • the development computer 100 includes a model creation unit 110, a model file storage unit 120, a model confirmation unit 130, a class definition generation unit 140, a method definition generation unit 150, a class code generation unit 160, and a source file storage unit 170.
  • the model creation unit 110 and the model confirmation unit 130 can receive input from the developer through the keyboard 12 and the mouse 13. Further, the model creation unit 110, the model confirmation unit 130, and the class code generation unit 160 can display the processing result on the screen of the monitor 11.
  • the model creation unit 110 creates a class diagram and a sequence diagram based on the input from the developer.
  • the model creation unit 110 has means for visually assisting the developer to draw the class diagram and the sequence diagram. For example, when a button displayed on the screen edge of the monitor 11 is pressed, a rectangle representing the class is arranged in the drawing area. Then, the model creation unit 110 stores the created class diagram and sequence diagram in the model file storage unit 120 as one file for each diagram.
  • the model file storage unit 120 stores a plurality of files created by the model creation unit 110.
  • the model confirmation unit 130 refers to the model file storage unit 120 and confirms whether a class diagram and a sequence diagram necessary for generating the source code have been created. In addition, the model confirmation unit 130 confirms that the created class diagram and the sequence diagram are consistent. For example, confirm that the class of the object described in the sequence diagram is also described in the class diagram. If the class diagram or the sequence diagram needs to be corrected, the model confirmation unit 130 displays the fact on the monitor 11. If no modification is required, the model checking unit 130 passes all the class diagrams stored in the model file storage unit 120 to the class definition generation unit 140 and also stores the class diagrams stored in the model file storage unit 120. All sequence diagrams are passed to the method definition generator 150.
  • the class definition generation unit 140 Upon receiving the class diagram from the model confirmation unit 130, the class definition generation unit 140 generates a class definition code for each class described in the received class diagram. Then, the class definition generation unit 140 passes the generated class definition code and the class diagram received from the model confirmation unit 130 to the class code generation unit 160.
  • the method definition generation unit 150 Upon receipt of the sequence diagram from the model confirmation unit 130, the method definition generation unit 150 generates a method definition code for each method call relationship described in the received sequence diagram. Then, the method definition generation unit 150 passes the generated method definition code and the sequence diagram received from the model confirmation unit 130 to the class code generation unit 160.
  • class code generation unit 160 When class code generation unit 160 receives data from both class definition generation unit 140 and method definition generation unit 150, class code generation unit 160 combines the class definition code and the method definition code for each class, and Generate source code for. The class code generation unit 160 stores the generated source code in the source file storage unit 170 as one file for each class. Thereafter, the class code generation unit 160 displays on the monitor 11 that the generation has been completed.
  • the source file storage unit 170 stores a plurality of files created by the class code generation unit 160.
  • UML is used as a description language for class diagrams and sequence diagrams.
  • Java registered trademark
  • the source code can be generated with the same configuration as the module configuration shown in Fig. 4.
  • FIG. 5 is an example of a class diagram used for generating source code.
  • the class diagram file 121 is stored in the model file storage unit 120.
  • Class diagram file 121 contains class 1 21a, 121b, 121c, 121d, 121e, 121f forces are described.
  • Word power described in the upper rectangle of each class is the class name of the class.
  • the class name of the class 121b is “slip”.
  • “ku main >>” and “ku table >>” are stereotypes. Stereotypes are additional information used when a class has a special meaning in distinction from other classes.
  • the stereo type " ⁇ main>>” in Figure 5 indicates that class 121a is the starting point for processing by the program.
  • the stereotype " ⁇ table >>" indicates that the class 12 If is a class representing a database table.
  • arrows are used to represent relationships between classes.
  • an arrow between class 1 21c and classes 121d and 121e indicates a generalization relationship.
  • Generalization is the extraction of features common to multiple classes and the definition of a superordinate concept class. In FIG. 5, it means that it is a “general item” of class 121d and a “voucher item” of class 121c and a “conventional item” of class 121c.
  • the other arrows in Figure 5 represent the reference relationship between classes.
  • each class is an attribute of the class.
  • the class 121b has three attributes “slip number”, “business partner”, and “quantity”.
  • Each attribute description consists of three forces: visibility, attribute name, and type.
  • Visibility defines the range of classes that can refer to the attribute. Attributes marked with “+” can be referenced from any class. An attribute with “#” can refer to the class power of the class having the attribute and the subordinate concept of the class having the attribute. For example, the attribute “product number” of class 121c cannot refer to force class 121b force that can be referenced from class 121d that is a subordinate concept. Attributes marked with “—” can only be referenced from classes with that attribute.
  • the type defines the type of data associated with the attribute.
  • four basic types can be used: "Boolean”, “Integer”, “Real”, “String”.
  • “Boolean” is a type that takes one of the values "True” or “False”!
  • “Int eger” is a type that takes an integer value.
  • “Real” is a type that takes a real value.
  • “String” is the string type.
  • FIG. 6 is an example of a sequence diagram used for generating source code.
  • the sequence diagram file 122 is stored in the model file storage unit 120.
  • the method call relations 122a, 122b, 122d, 122e, 122f between the talents generated by the classes 121a, 121b, 121d, 121f are described.
  • a vertical dotted line (object lifeline) indicating the lifetime of the object is described.
  • the rectangle described above the object lifeline means the object.
  • the “order” object arranged on the leftmost side in FIG. 6 is an object generated from the class 121a.
  • a vertically long rectangular section (activation section) arranged on the object lifeline means a section in which the object executes processing.
  • the method call relationship between two objects is represented by a horizontal arrow.
  • the method call relation 122b means a method call from the “order” object to the “slip” object.
  • a method name is assigned to each method call relationship.
  • the method name of the method call relation 122b is “slip creation”.
  • the stereotype “ku create >>” means that the caller object creates a new callee object.
  • the method call relation 122a means that the “order received” object newly generates an object of the class 121b.
  • the stereotype " ⁇ SQL >>” means that the caller object operates the callee table.
  • the type of operation for the table is defined by the method name. Specifically, “SELECT” (data search), “INSERT” (data addition), “UPDATE” (data update), or “DELETE” (data deletion) is described as the method name. To do.
  • a method call with the stereotype " ⁇ SQL>>” appended In the relationship, information on table operation conditions is also given. For example, the method call relationship 122f means that the “slip” object searches the “stock” table.
  • a constraint expression indicating a precondition and a constraint expression indicating a postcondition can be added to each method call relationship.
  • the precondition is a condition that should be satisfied immediately before the method call
  • the postcondition is a condition that should be satisfied immediately after the method call.
  • the precondition constraint expression is described after "pre:”.
  • Post-condition constraint expressions are written after "post:”. When describing multiple constraint expressions, use the logical operation symbol (for example, "&") to separate each constraint expression.
  • a constraint expression indicating a universal condition can be further added to the method call relation.
  • a universal condition is a condition that must be satisfied from the time a method is called until the called method completes execution.
  • the constraint expression for universal conditions is described after "in V:”. For example, since the “ordinary item” object does not make a method call to another object, a universal condition is set for the method call relation 122e.
  • First-order predicate logic is a notation that represents knowledge by combining sentences that can be judged true or false.
  • first-order predicate logic is used as a constraint expression, it means that the variables in the constraint expression are bound so that the whole expression is true.
  • the precondition of the method call relation 122b specifies that the value of “special specification” is “Fal se”.
  • the precondition of method call relation 122e specifies that the value of "quantity” is equal to the value of "quantity” plus 1.
  • the variable “quantity” is the variable "quantity” It means a variable to hold the value after the calculation for ".”
  • the universal condition of the method call relation 122e stipulates that when the value of "money amount” is less than “2000”, it is equal to 1.1 times the value of "money amount”"valueamount” money ".
  • the readability of the power sequence diagram that can express the repetition of the processing by the quantization symbol may be lowered, so that the quantization symbol is not used.
  • the repetition of processing is expressed using a frame which is a notation of a sequence diagram.
  • the frame 122c means that the process between the method call relationship 122d and the method call relationship 122e is repeated while the value of the variable “i” is 0 to 4 (that is, 5 times).
  • FIG. 7 is a flowchart showing the procedure of the class definition generation process. In the following, the process shown in FIG. 7 will be described in order of step number.
  • the class definition generation unit 140 selects one class that has not yet generated a class definition code from the classes described in the class diagram. However, stereotype "
  • This class is also a special class for representing database tables.
  • Step S12 The class definition generation unit 140 extracts the class name of the class selected in Step S11, and creates a class declaration statement including the extracted class name.
  • "public class [class name] ⁇ " is the class declaration statement.
  • Step S 13 The class definition generation unit 140 refers to the class diagram and determines whether there is a higher concept class that has a generalization relationship with the class selected in step S 11. If it exists, the process proceeds to Step S14. If not, the process goes to step S 1
  • Step S 14 The class definition generation unit 140 extracts a class name of a superordinate concept class having a generalization relationship with the class selected in Step S 11. Then, the class definition generator 140 Insert the inheritance declaration statement that includes the issued class name into the class declaration statement created in step S12. In the Java description method, "extends [parent class name]" is inserted after the class name in the class declaration statement created in step S12.
  • the class definition generation unit 140 extracts the attributes of the class selected in Step S 11, and creates an attribute declaration statement including the extracted attribute visibility, attribute name, and type.
  • an attribute declaration statement is created for each attribute in the form "[visibility] [type] [attribute name];”.
  • visibility is converted to "+,," "public”, “#” is “protected”, "—” is converted to "private”
  • types are "Boolean,, force 'boolean”, “Integer” K “int”, “Real” is converted to "float”, "String” is converted to “String”, respectively.
  • the class definition generation unit 140 inserts the created attribute declaration statement into the class declaration statement created in step S13.
  • an attribute declaration statement is inserted between the curly braces.
  • Step S16 The class definition generation unit 140 determines whether or not processing has been performed for all classes described in the class diagram. If all classes have been processed, processing ends. If there is a class that has not yet been processed, the process proceeds to step S11.
  • the class definition generation unit 140 creates a class declaration statement and an attribute declaration statement for each class described in the class diagram. Then, the class definition generation unit 140 inserts an attribute declaration statement into the class declaration statement and generates a class definition code.
  • FIG. 8 is a flowchart showing the procedure of the method definition generation process. In the following, the process shown in FIG. 8 will be described in order of step number.
  • the method definition generation unit 150 generates an object generated from a class with the stereotype “ku main>>”, that is, a method from another object placed on the leftmost side of the sequence diagram. Select the object to call! /, Na! /. Then, the method definition generation unit 150 adds the method call relationship with the method name “init” to the sequence diagram when the selected object is the method call destination. This is because in the sequence diagram, the method call relationship for starting the process first is not specified.
  • the method definition generation unit 150 still generates a method definition code from the method call relationships described in the sequence diagram, and selects one method call relationship. However, the method call relation with the stereotype " ⁇ create>>” or " ⁇ SQL>>” attached is not selected. This is because this method call relationship does not have the meaning of starting the execution of processing by the object of the method call destination.
  • the method definition generation unit 150 extracts the method call-related method name selected in Step S22, and creates a method declaration statement including the extracted method name.
  • "public void [method name] () ⁇ " is the method declaration statement. If a return value is set for the method, the return value type is described instead of the above "void". If an argument is set for the method, the argument type and argument name are described between the parentheses after the method name.
  • the method definition generation unit 150 refers to the sequence diagram and determines whether or not there is a method call relationship to another object in the activity interval started by the method call. to decide. If a method call relationship exists, the process proceeds to step S25. If there is no method call relationship, the process proceeds to step S29.
  • Step S25 The method definition generation unit 150 turns the activity start section started by the method call downward, and selects one of the next method call relations. Then, when a precondition is added to the selected method call relationship, the method definition generation unit 150 converts the precondition constraint expression into a calculation expression written in a programming language. A specific method for converting the constraint formula force into the calculation formula will be described later. Thereafter, the method definition generation unit 150 inserts the converted calculation formula at the end of the parentheses in the method declaration statement created in step S23. If there is a start line for the iteration process before the method call relationship, insert the calculation expression that starts the iteration process in the method declaration statement before the precondition calculation expression.
  • Step S26 The method definition generation unit 150 calls the method selected in Step S25. Extract the method name of the relationship and the class name of the method call destination object. And
  • the method definition generation unit 150 creates a method call calculation formula from the extracted method name and class name. A specific method for creating a method call calculation formula will be described later. After that, the method definition generation unit 150 inserts the created calculation expression at the end of the braces in the method declaration statement created in step S23.
  • Step S27 When the post-condition is added to the method call relationship selected in Step S25, the method definition generation unit 150 converts the post-condition constraint expression into a calculation expression described in the programming language. The conversion method from the constraint equation to the calculation equation is the same as that of the precondition in step S25. Then, the method definition generation unit 150 inserts the converted calculation expression at the end of the braces in the method declaration statement created in step S23. If there is an end line for the iteration process after the method call relationship, a calculation expression for terminating the iteration process is further inserted in the method declaration statement. In the Java description method, the end line of the iterative process is converted to " ⁇ ".
  • Step S28 The method definition generation unit 150 determines whether or not a method call relationship further exists below the currently active activity interval. If a method call relationship exists, the process proceeds to step S25. If the method call relationship does not exist, the process proceeds to step S30.
  • Step S29 When a universal condition is added to the method call relationship selected in Step S22, the method definition generation unit 150 converts the constraint expression of the universal condition into a calculation expression described in a programming language. The conversion method from the constraint equation to the calculation equation is the same as in the case of the precondition in step S25. Then, the method definition generation unit 150 inserts the converted calculation expression at the end of the braces in the method declaration statement created in step S23.
  • Step S30 The method definition generation unit 150 determines whether or not processing has been performed according to all the method call relationships described in the sequence diagram. If all method invocation relationships have been processed, processing ends. If there is a method call relationship that has not yet been processed, the process proceeds to step S22.
  • the method of creating the calculation formula indicating the method call performed in step S26 is as follows.
  • a normal method call formula between objects is created.
  • object variable name [Method name] ();” is the calculation formula.
  • the non-object variable name is, for example, “obj— [class name]”.
  • a calculation formula for operating the database table is created.
  • the method definition generation unit 150 generates a method definition code including a calculation formula created from a precondition, a postcondition, or a universal condition for each method call relationship described in the sequence diagram. To do.
  • FIG. 9 is a flowchart showing the procedure of the class code generation process. In the following, the process shown in FIG. 9 will be described in order of step number.
  • the class code generation unit 160 selects one of the plurality of class definition codes generated by the class definition generation unit 140, and identifies the class from the class name described in the class definition code. .
  • the class code generation unit 160 refers to the sequence diagram received from the method definition generation unit 150, and identifies a method belonging to the class identified in step S31.
  • a method belonging to a class is a method represented by a method call relationship in which an object generated by class power is a method call destination.
  • the class code generation unit 160 extracts a method definition code corresponding to the identified method, and inserts all the extracted method definition codes at predetermined positions of the class definition code selected in step S31.
  • the method definition code is inserted at the end of the curly braces of the class definition code.
  • the class code generation unit 160 refers to the class diagram received from the class definition generation unit 140, and determines whether or not the class identified in step S31 has the stereotype “ ⁇ main >>”. Determine whether. If so, the process proceeds to step S34. If the stereotype “ ⁇ main >>” is not present, the process proceeds to step S35.
  • Step S34 The class code generating unit 160 inserts the main method into the class definition code selected in Step S31.
  • the main method is a special method that is executed at the start of processing by the program.
  • the method definition generation unit 150 generates the method definition code of the “init” method! Therefore, a calculation formula for calling the “init” method is described in the main method.
  • processing is started from the class specified in step S31.
  • the insertion position of the main method is the same as the position where the method is inserted in step S32.
  • the class code generation unit 160 outputs the class source code having the class definition code and the method definition code to a file.
  • Step S36 The class code generator 160 generates the class generated by the class definition generator 140. It is determined whether or not the processing has been performed for all of the definition codes. If all class definition codes have been processed, processing ends. If there is a class definition code that has not been processed, the process proceeds to step S31.
  • the class code generation unit 160 synthesizes the class definition code generated by the class definition generation unit 140 and the method definition code generated by the method definition generation unit 150 for each class, and generates a class code. Is generated.
  • the source code generated in this embodiment is written in Java.
  • FIG. 10 is a diagram illustrating an example of generating a source code of a method call source.
  • the source file 171 is a file stored in the source file storage unit 170.
  • the source code described in the source file 171 is source code corresponding to the class 121a in FIG.
  • the class declaration statement 171a is generated based on the class name of the class 121a.
  • the attribute declaration statement 171b is generated based on the attribute description of the class 121a.
  • the method declaration statement 171c is a method declaration statement automatically generated by the program generation device because the stereotype “ku main >>” is added to the class 121a.
  • the calculation formula 171d is generated based on the method call relationship 122a described in the sequence diagram file 122.
  • the calculation formula 171e is generated based on the method call relation 122b to which the precondition and the postcondition are added.
  • error processing indicated by the calculation formula below “catch” is executed for errors that occur between "try” and "catch”.
  • the method definition code 171f is a definition code of the main method that is automatically generated by the program generation device because the stereotype “ ⁇ main >>” is added to the class 12 la.
  • FIG. 11 is a diagram illustrating an example of generating a source code of a method call destination.
  • the source file 172 is a file stored in the source file storage unit 170.
  • the source code described in source file 172 is the source code corresponding to class 121b in FIG.
  • the class declaration statement 172a is generated based on the class name of the class 121b.
  • the attribute declaration statement 172b is generated based on the attribute description of class 12 lb.
  • the method declaration statement 172c is generated based on the method name of the method call relationship 122b described in the sequence diagram file 122.
  • the calculation formula 172d is generated based on the frame 122c indicating the repetition of the processing. Thereby, the processing from the calculation formula 172e to the calculation formula 172f is repeated.
  • the calculation formula 172e is generated based on the method call relation 122d.
  • the calculation formula 172f is generated based on the method call relation 122e to which the precondition is added.
  • the universal condition added to the method call relation 122e is reflected in the method of the class 121d of “ordinary details” that is the method call destination.
  • the calculation formula 172g is generated based on the method call relation 122f.
  • a developer can generate source code including a specific calculation procedure of processing by a program from a class diagram and a sequence diagram. Therefore, the developer does not need to write the source code directly, and can concentrate on the description of the class diagram and sequence diagram.
  • the program generation apparatus does not depend on a specific model description language or programming language, and can be easily applied to various model description languages and programming languages. Moreover, it can be applied to the generation of various types of programs, not limited to programs that operate database tables.
  • a non-hierarchical sequence diagram is used, but a hierarchized sequence diagram may be used.
  • a hierarchized sequence diagram may be used.
  • details of processing performed in the active section of one sequence diagram may be developed and described in another sequence diagram.
  • the calculation formula based on the universal conditional constraint formula is not generated.
  • the source code generation program, the source code generation method, and the source code of the present invention Although the present invention has been described with reference to the illustrated embodiment, the present invention is not limited to this, and the configuration of each part may be replaced with any configuration having a similar function. it can. Moreover, other arbitrary structures and processes may be added to the present invention.
  • the present invention may be a combination of any two or more configurations (features) of the above-described embodiments.
  • the above processing functions can be realized by a general-purpose computer.
  • a program describing the processing contents of the functions that the development computer 100 should have is provided.
  • the program describing the processing contents can be recorded on a computer-readable recording medium.
  • the computer-readable recording medium include a magnetic recording device, an optical disk, a magneto-optical recording medium, and a semiconductor memory.
  • the magnetic recording device include a hard disk device (HDD), a flexible disk (FD), and a magnetic tape.
  • optical disk examples include a DVD (Digital Versatile Disc), a DVD-RAM (Random Access Memory), a CD-ROM (Compact Disc Read Only Memory), and a CD-R (Recordable) / RW (Rewritable).
  • magneto-optical recording medium examples include MO (Magneto-Optical disk).
  • a computer that executes a source code generation program stores, for example, a program recorded on a portable recording medium or a program transferred with server computer power in its own storage device. Then, the computer reads the program from its own storage device and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. In addition, each time the computer is transferred, the computer can also execute processing in accordance with the received program.
  • the above merely illustrates the principle of the present invention. In addition, many variations and modifications will be apparent to those skilled in the art, and the invention is not limited to the precise configuration and application shown and described above, but all corresponding variations and equivalents may be It is regarded as the scope of the present invention by the claims and their equivalents.

Landscapes

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

Abstract

 オブジェクト指向のクラス図とシーケンス図とから、具体的な計算手順を含むソースコードを生成する。  モデル記憶手段(1a)は、オブジェクトの属性をクラスごとに記述したクラス図(2)と、制約条件を示す制約式(3a)がメソッド呼び出し関係に対して付加されたシーケンス図(3)とを記憶する。クラス定義生成手段(1b)は、クラス図(2)に記述されたクラスごとに、クラス宣言文と属性宣言文とを備えるクラス定義コードを生成する。メソッド定義生成手段(1c)は、シーケンス図(3)に記述されたメソッド呼び出し関係ごとに、制約式(3a)を処理コードに変換してメソッド定義コードを生成する。クラスコード生成手段(1d)は、クラス定義コードと、そのクラスに属するすべてのメソッド定義コードとを合成して、ソースコードを出力する。                                                                                 

Description

明 細 書
ソースコード生成プログラム、ソースコード生成方法およびソースコード生 成装置
技術分野
[0001] 本発明はプログラムのソースコードを生成するソースコード生成プログラム、ソースコ ード生成方法およびソースコード生成装置に関し、特にオブジェクト指向のモデルか らプログラムのソースコードを生成するソースコード生成プログラム、ソースコード生成 方法およびソースコード生成装置に関する。
背景技術
[0002] 現在、コンピュータで実行されるソフトウェアが大規模化、複雑化するに伴い、ソフト ウェア開発においてモデルを使用した設計が行われている。モデルとは、ソフトウェア の設計図であり、ソフトウェアの構造や動作を理解が容易な形式で抽象的に記述し たものである。モデルを記述することで、開発者は開発対象のソフトウェアの機能を容 易に把握することができる。また、複数の開発者間での意思疎通も容易となる。
[0003] ここで、モデルを記述する手段として、オブジェクト指向のモデル記述言語が使用さ れることが多い。オブジェクト指向とは、ソフトウェアを構成する部品の最小単位として クラスを定義し、クラス間の関係によってソフトウェア全体の機能を記述するという開発 方法である。各クラスには、そのクラスから生成されるオブジェクトが保持できるデータ の種類 (属性)と、オブジェ外が実行すべき処理 (メソッド)との情報が定義される。ォ ブジェクト指向に基づくモデル記述言語としては、例えば、標準化団体の OMG (Obj ect Management Group)が策定した UML (Unified Modeling Language); ^ある ( 特 許文献 1参照)。 UMLでは、クラスの静的構造を表現するクラス図や、クラス間の相 互作用を表現するシーケンス図など、複数種類の図が用意されている。開発者は、 記述した 、内容に応じてこの中から幾つかの図を選択し、モデルを記述する。
[0004] 一方、ソフトウェアをコンピュータで実行させるためには、最終的にプログラムのソー スコードを作成しなければならない。そのため、開発者はモデルを記述した後、モデ ルを参照しながら改めてソースコードを記述する必要がある。そして、開発の途中で ソフトウェアの機能を変更する場合、モデルとソースコードの両方を変更する必要が ある。ソースコードのみを変更したのでは、モデルを見た他の開発者がソフトウェアの 機能を誤って認識することになるからである。このように、モデルを使用した開発では 、モデルの作成とソースコードの作成との二重の作業負担を強いられるという問題が ある。
[0005] そこで、モデルの記述とソースコードの記述とを連携させる開発支援ツールが知ら れている。例えば、開発者がモデルを記述すると、開発支援ツールがモデルに対応 するソースコードを生成する。また、生成されたソースコードを開発者が変更すると、 開発支援ツールがモデルにその変更を反映させる。このような開発支援ツールを利 用することで、開発者の作業負担が大きく軽減される。モデル力 ソースコードを生成 する方法の指針としては、標準化団体の OMGが提案して!/、る MDA (Model-Driven Architecture)がある(非特許文献 2参照)。
非特干文献 1: Object Management Group ^ "Unined Modeling Language 、 [online]、 [2006年 3月 20日検索]、インターネットく URL: http://www.omg.org/technology/do cuments/ formal/ uml.htm)
非特許文献 2 : Object Management Group ^ "MDA Guide Version 1.0.1"、 [online」、 [ 2006年 3月 20日検索]、インターネットく URL: http://www.omg.org/docs/omg/03-0 6-01. pdl)
発明の開示
発明が解決しょうとする課題
[0006] しかし、非特許文献 2記載の技術では、モデル力 具体的な計算手順も含むソース コードを生成する方法が示されていないという問題がある。一般に、モデルは開発者 が理解容易な形式で抽象的に記述されるため、詳細な計算手順に関する情報が不 足している。このため、従来の開発支援ツールはモデル力もソースコードの一部を生 成し、詳細な計算手順の部分は開発者が手作業で追加していた。したがって、開発 者は依然としてモデルとソースコードとの両方を見ながら開発作業を進める必要があ つた o
[0007] 本発明はこのような点に鑑みてなされたものであり、オブジェクト指向のモデルから 具体的な計算手順を含むソースコードを生成するソースコード生成プログラム、ソー スコード生成方法およびソースコード生成装置を提供することを目的とする。
課題を解決するための手段
[0008] 本発明では上記課題を解決するために、図 1に示すようなソースコード生成プログ ラムが提供される。本発明に係るソースコード生成プログラムは、クラス図と付加的記 述を有するシーケンス図とから、具体的な計算手順を含むソースコードを生成するも のである。このソースコード生成プログラムを実行するコンピュータ 1は、モデル記憶 手段 la、クラス定義生成手段 lb、メソッド定義生成手段 lcおよびクラスコード生成手 段 Idを有する。モデル記憶手段 laは、プログラム中で使用されるオブジェクトの属性 をクラスごとに記述したクラス図 2と、プログラム中で使用される変数についての制約 条件を示す制約式 3aがメソッド呼び出し関係に対して付加されたシーケンス図 3とを 記憶する。クラス定義生成手段 lbは、モデル記憶手段 laに記憶されたクラス図 2を 参照して、クラス図 2に記述されたクラスごとに、クラスを宣言するクラス宣言文と、クラ スの属性を宣言する属性宣言文とを備えるクラス定義コードを生成する。メソッド定義 生成手段 lcは、モデル記憶手段 laに記憶されたシーケンス図 3を参照して、シーケ ンス図 3に記述されたメソッド呼び出し関係ごとに、メソッド呼び出し関係に付加され た制約式 3aをプログラムの処理内容を示す処理コードに変換し、メソッドを宣言する メソッド宣言文と変換した処理コードとを備えるメソッド定義コードを生成する。クラスコ ード生成手段 Idは、シーケンス図 3を参照して、メソッド定義生成手段 lcで生成した メソッド定義コードをメソッドが属するクラスごとに分類すると共に、クラス定義生成手 段 lbで生成したクラス定義コードと、クラス定義コードで示されるクラスに属するすべ てのメソッド定義コードとを合成して、クラス 2a, 2bのソースコード 4a, 4bを出力する。
[0009] このようなソースコード生成プログラムによれば、クラス定義生成手段 lbにより、クラ ス図 2に記述されたクラス 2a, 2bごとに、クラス宣言文と属性宣言文とを備えるクラス 定義コードが生成される。また、メソッド定義生成手段 lcにより、シーケンス図 3に記 述されたメソッド呼び出し関係ごとに、メソッド宣言文と処理コードとを備えるメソッド定 義コードが生成される。そして、クラスコード生成手段 Idにより、クラス定義コードと、 そのクラスに属するメソッドのメソッド定義コードとが合成され、クラス 2a, 2bのソースコ ード 4a, 4bが出力される。
[0010] また、上記課題を解決するために、オブジェクト指向のモデル力 プログラムのソー スコードを生成するソースコード生成方法において、クラス定義生成手段が、プロダラ ム中で使用されるオブジェクトの属性をクラスごとに記述したクラス図がモデル記憶手 段に記憶されており、前記モデル記憶手段に記憶された前記クラス図を参照して、前 記クラス図に記述されたクラスごとに、前記クラスを宣言するクラス宣言文と、前記クラ スの属性を宣言する属性宣言文とを備えるクラス定義コードを生成し、メソッド定義生 成手段が、プログラム中で使用される変数についての制約条件を示す制約式カ ソ ッド呼び出し関係に対して付加されたシーケンス図が前記モデル記憶手段に記憶さ れており、前記モデル記憶手段に記憶された前記シーケンス図を参照して、前記シ 一ケンス図に記述された前記メソッド呼び出し関係ごとに、前記メソッド呼び出し関係 に付加された前記制約式をプログラムの処理内容を示す処理コードに変換し、メソッ ドを宣言するメソッド宣言文と変換した前記処理コードとを備えるメソッド定義コードを 生成し、クラスコード生成手段が、前記シーケンス図を参照して、前記メソッド定義生 成手段で生成した前記メソッド定義コードをメソッドが属するクラスごとに分類すると共 に、前記クラス定義生成手段で生成した前記クラス定義コードと、前記クラス定義コー ドで示されるクラスに属するすべての前記メソッド定義コードとを合成して、前記クラス のソースコードを出力する、ことを特徴とするソースコード生成方法が提供される。
[0011] このようなソースコード生成方法によれば、クラス図 2に基づいて、クラス図 2に記述 されたクラス 2a、 2bごとに、クラス宣言文と属性宣言文とを備えるクラス定義コードが 生成される。また、シーケンス図 3に基づいて、シーケンス図 3に記述されたメソッド呼 び出し関係ごとに、メソッド宣言文と処理コードとを備えるメソッド定義コードが生成さ れる。そして、クラス定義コードと、そのクラスに属するメソッドのメソッド定義コードとが 合成され、クラスのソースコードが出力される。
[0012] また、上記課題を解決するために、オブジェクト指向のモデル力 プログラムのソー スコードを生成するソースコード生成装置において、プログラム中で使用されるォブ ジェタトの属性をクラスごとに記述したクラス図と、プログラム中で使用される変数につ いての制約条件を示す制約式カ ソッド呼び出し関係に対して付加されたシーケン ス図とを記憶するモデル記憶手段と、前記モデル記憶手段に記憶された前記クラス 図を参照して、前記クラス図に記述されたクラスごとに、前記クラスを宣言するクラス宣 言文と、前記クラスの属性を宣言する属性宣言文とを備えるクラス定義コードを生成 するクラス定義生成手段と、前記モデル記憶手段に記憶された前記シーケンス図を 参照して、前記シーケンス図に記述された前記メソッド呼び出し関係ごとに、前記メソ ッド呼び出し関係に付加された前記制約式をプログラムの処理内容を示す処理コー ドに変換し、メソッドを宣言するメソッド宣言文と変換した前記処理コードとを備えるメ ソッド定義コードを生成するメソッド定義生成手段と、前記シーケンス図を参照して、 前記メソッド定義生成手段で生成した前記メソッド定義コードをメソッドが属するクラス ごとに分類すると共に、前記クラス定義生成手段で生成した前記クラス定義コードと、 前記クラス定義コードで示されるクラスに属するすべての前記メソッド定義コードとを 合成して、前記クラスのソースコードを出力するクラスコード生成手段と、を有すること を特徴とするソースコード生成装置が提供される。
[0013] このようなソースコード生成装置によれば、上記ソースコード生成プログラムを実行 するコンピュータと同様の処理が行われる。
発明の効果
[0014] 本発明では、シーケンス図のメソッド呼び出し関係に対して付加された情報から、メ ソッドで実行される処理内容を示す処理コードを生成することとした。これにより、ソフ トウエアの開発者は、ソースコードを直接記述する必要がなくなり、モデルの記述に集 中することができる。また、モデルに付加される情報として制約式を用いることとしたの で、モデルの意味や理解容易性を害することがない。
[0015] 本発明の上記および他の目的、特徴および利点は本発明の例として好ま U、実施 の形態を表す添付の図面と関連した以下の説明により明らかになるであろう。
図面の簡単な説明
[0016] [図 1]実施の形態に適用される発明を示す原理図である。
[図 2]本実施の形態のシステム構成を示す図である。
[図 3]開発用コンピュータのハードウェア構成を示す図である。
[図 4]開発用コンピュータの機能を示すブロック図である。 [図 5]ソースコードの生成に使用されるクラス図の例である。
[図 6]ソースコードの生成に使用されるシーケンス図の例である。
[図 7]クラス定義生成処理の手順を示すフローチャートである。
[図 8]メソッド定義生成処理の手順を示すフローチャートである。
[図 9]クラスコード生成処理の手順を示すフローチャートである。
[図 10]メソッド呼び出し元のソースコードの生成例を示す図である。
[図 11]メソッド呼び出し先のソースコードの生成例を示す図である。
発明を実施するための最良の形態
[0017] 以下、本発明の実施の形態を図面を参照して詳細に説明する。まず、本発明の概 要について説明し、その後、実施の形態の具体的な内容を説明する。
図 1は、実施の形態に適用される発明を示す原理図である。図 1に示されるプロダラ ム生成装置は、開発者が記述したクラス図とシーケンス図とから、オブジェクト指向の プログラミング言語で記述されたプログラムのソースコードを生成するものである。コン ピュータ 1は、モデル記憶手段 la、クラス定義生成手段 lb、メソッド定義生成手段 lc およびクラスコード生成手段 Idを有する。
[0018] モデル記憶手段 laは、開発者が記述したクラス図 2とシーケンス図 3とを記憶する。
クラス図 2には、開発対象のプログラムを構成する複数のクラス 2a, 2bが記述される。 それぞれのクラスには、プログラム中で使用されるオブジェクトの属性が定義される。 例えば、クラス 2aには、属性" al"と属性" a2"とが定義されている。
[0019] 一方、シーケンス図 3には、クラス図 2に記述されたクラス 2a, 2bから生成されるォ ブジエタトの間のメソッド呼び出し関係が記述される。メソッド呼び出し関係は矢印に よって表現される。例えば、シーケンス図 3では、クラス 2aのオブジェクトからクラス 2b のオブジェクトへのメソッド" fl"の呼び出しが定義されている。そして、メソッド呼び出 し関係に対して、プログラム中で使用される変数についての制約条件を示す制約式 3aが付力!]される。
[0020] クラス定義生成手段 lbは、モデル記憶手段 laに記憶されたクラス図 2から、クラス ごとに、クラスを宣言するクラス宣言文とクラスの属性を宣言する属性宣言文とを有す るクラス定義コードを生成する。クラス定義コードは、クラスの宣言に関する静的な情 報のみから構成され、計算手順に関する情報を含まない。生成されるクラス定義コー ドの形式は、ソースコード 4a, 4bで使用するプログラミング言語の文法に従う。
[0021] メソッド定義生成手段 lcは、モデル記憶手段 laに記憶されたシーケンス図 3から、 メソッド呼び出しごとに、メソッドを宣言するメソッド宣言文と処理コードとを有するメソッ ド定義コードを生成する。処理コードは、メソッドで実行される処理の具体的な計算手 順を含むコードである。メソッド定義生成手段 lcは、メソッド呼び出し関係に付加され た制約式 3aを、ソースコード 4a, 4bで使用するプログラミング言語の文法に従うよう に変換し、処理コードを生成する。
[0022] クラスコード生成手段 Idは、まず、メソッド定義生成手段 lcで生成されるメソッド定 義コードを、そのメソッドが属するクラスごとに分類する。そして、クラスコード生成手段 Idは、クラスごとに、クラス定義生成手段 lbで生成されるクラス定義コードと、分類し たメソッド定義コードとを合成して、ソースコード 4a, 4bを生成する。生成されるソース コード 4a, 4bは、クラスの宣言に関する静的な情報と、処理の具体的な計算手順を 含んだメソッドの情報とを有する。
[0023] このようなプログラム生成装置によれば、クラス定義生成手段 lbにより、開発者が記 述したクラス図 2に含まれるクラス 2a, 2bごとに、クラス宣言文と属性宣言文とを有す るクラス定義コードが生成される。また、メソッド定義生成手段 lcにより、開発者が記 述したシーケンス図 3に含まれるメソッド呼び出し関係ごとに、メソッド宣言文と処理コ 一ドとを有するメソッド定義コードが生成される。そして、クラスコード生成手段 Idによ り、クラス定義コードと、そのクラスに属するメソッドのメソッド定義コードとが合成され、 クラスのソースコード 4a, 4bが生成される。
[0024] これにより、開発者が記述したクラス図とシーケンス図とから、処理の具体的な計算 手順を含むソースコードが生成される。したがって、開発者はソースコードを直接記 述する必要がなくなり、モデルの記述に集中することができる。そして、開発途中でソ フトウェアの機能を変更する必要が生じた場合でも、開発者はクラス図とシーケンス 図とを変更するだけで、その変更をプログラムに反映させることができる。
[0025] なお、シーケンス図に付加する情報として、手続き的な記述ではなく制約式を用い るため、シーケンス図が本来もつ意味や理解容易性を害することがない。 以下、本発明の実施の形態を、図面を参照して詳細に説明する。
[0026] 図 2は、本実施の形態のシステム構成を示す図である。開発用コンピュータ 100、 受注処理サーバ 200およびデータベースサーバ 300が、ネットワーク 10を介して相 互に接続されている。
[0027] 開発用コンピュータ 100は、ソフトウェアの開発者がプログラム作成の作業を行うた めのコンピュータである。本実施の形態では、開発者は、データベースを参照して受 注処理を実行するプログラムを開発するものとする。開発者は、開発用コンピュータ 1 00を使用して、クラス図とシーケンス図とを記述し、記述したクラス図とシーケンス図と 力もソースコードを生成する。そして、開発者は、生成されたソースコードを実行形式 のバイナリコードに変換し、ネットワーク 10を介して受注処理サーバ 200に配置する。
[0028] 受注処理サーバ 200は、受注処理を行うプログラムを実行するためのアプリケーシ ヨンサーバである。受注処理を行うプログラムは、ネットワーク 10を介してデータべ一 スサーバ 300と通信を行いながら処理を進める。データベースサーバ 300は、商品 の受注に関するデータからなるデータベースを備えて 、る。データベースサーバ 300 は、受注処理サーバ 200からの要求に応じて、データの検索や更新を実行する。
[0029] 次に、開発用コンピュータ 100、受注処理サーバ 200およびデータベースサーバ 3 00のハードウェア構成について説明する。ただし、これらのコンピュータは同様のハ 一ドウエア構成によって実現できるため、代表して開発用コンピュータ 100について 説明する。
[0030] 図 3は、開発用コンピュータのハードウェア構成を示す図である。開発用コンビユー タ 100は、 CPU (Central Processing Unit) 101によって装置全体が制御されている。 CPU101には、バス 107を介して RAM (Random Access Memory) 102、ハードディ スクドライブ(HDD : Hard Disk Drive) 103、グラフィック処理装置 104、入力インタフ エース 105および通信インタフェース 106が接続されている。
[0031] RAM102には、 CPU101に実行させる OSプログラムやアプリケーションプログラ ムの少なくとも一部が一時的に格納される。また、 RAM102には、 CPU101による 処理に必要な各種データが格納される。 HDD103には、 OSプログラムやアプリケー シヨンプログラムが格納される。グラフィック処理装置 104には、モニタ 11が接続され ている。グラフィック処理装置 104は、 CPU101からの命令に従って、画像をモニタ 1 1の画面に表示させる。入力インタフェース 105には、キーボード 12とマウス 13とが 接続されている。入力インタフェース 105は、キーボード 12やマウス 13から送られて くる信号を、バス 107を介して CPU101に送信する。通信インタフェース 106は、ネッ トワーク 10に接続されて 、る。
[0032] 以上のようなハードウェア構成によって、本実施の形態の処理機能を実現すること ができる。
次に、開発用コンピュータ 100のモジュール構成について説明する。
[0033] 図 4は、開発用コンピュータの機能を示すブロック図である。開発用コンピュータ 10 0は、モデル作成部 110、モデルファイル記憶部 120、モデル確認部 130、クラス定 義生成部 140、メソッド定義生成部 150、クラスコード生成部 160およびソースフアイ ル記憶部 170を有する。モデル作成部 110およびモデル確認部 130は、キーボード 12およびマウス 13を通じて開発者からの入力を受け取ることができる。また、モデル 作成部 110、モデル確認部 130およびクラスコード生成部 160は、モニタ 11の画面 に処理結果を表示することができる。
[0034] モデル作成部 110は、開発者力もの入力に基づいてクラス図とシーケンス図とを作 成する。ここで、モデル作成部 110は、開発者によるクラス図とシーケンス図との作図 を視覚的に支援する手段をもつ。例えば、モニタ 11の画面端に表示されたボタンを 押すことで、描画領域にクラスを表す矩形が配置されるようにする。そして、モデル作 成部 110は、作成したクラス図とシーケンス図を、図ごとに 1つのファイルとしてモデル フアイル記憶部 120に格納する。
[0035] モデルファイル記憶部 120は、モデル作成部 110で作成された複数のファイルを格 納する。
モデル確認部 130は、ソースコードを生成する指示が入力されると、モデルファイル 記憶部 120を参照し、ソースコードの生成に必要なクラス図とシーケンス図とが作成さ れているかを確認する。また、モデル確認部 130は、作成されたクラス図とシーケンス 図とが整合性をもつことを確認する。例えば、シーケンス図に記述されたオブジェクト のクラスが、クラス図にも記述されて 、ることを確認する。 [0036] そして、クラス図またはシーケンス図の修正が必要な場合、モデル確認部 130は、 その旨をモニタ 11に表示する。修正が必要ない場合は、モデル確認部 130は、モデ ルファイル記憶部 120に格納されたすベてのクラス図をクラス定義生成部 140へ渡 すと共に、モデルファイル記憶部 120に格納されたすベてのシーケンス図をメソッド 定義生成部 150へ渡す。
[0037] クラス定義生成部 140は、モデル確認部 130からクラス図を受け取ると、受け取った クラス図に記述されたクラスごとに、クラス定義コードを生成する。そして、クラス定義 生成部 140は、生成したクラス定義コードとモデル確認部 130から受け取ったクラス 図とをクラスコード生成部 160へ渡す。
[0038] メソッド定義生成部 150は、モデル確認部 130からシーケンス図を受け取ると、受け 取ったシーケンス図に記述されたメソッド呼び出し関係ごとに、メソッド定義コードを生 成する。そして、メソッド定義生成部 150は、生成したメソッド定義コードとモデル確認 部 130から受け取ったシーケンス図とをクラスコード生成部 160へ渡す。
[0039] クラスコード生成部 160は、クラス定義生成部 140とメソッド定義生成部 150との両 方力 データを受け取ると、クラスごとに、クラス定義コードとメソッド定義コードとを合 成して、クラスのソースコードを生成する。そして、クラスコード生成部 160は、生成し たソースコードを、クラスごとに 1つのファイルとしてソースファイル記憶部 170に格納 する。その後、クラスコード生成部 160は、生成が完了した旨をモニタ 11に表示する
[0040] ソースファイル記憶部 170は、クラスコード生成部 160で作成された複数のファイル を格納する。
なお、本実施の形態では、クラス図とシーケンス図の記述言語として UMLを使用 するものとする。また、ソースコードを記述するプログラミング言語として Java (登録商 標)を使用するものとする。他のモデル記述言語やプログラミング言語を使用する場 合も、図 4に示したモジュール構成と同様の構成で、ソースコードの生成を実現できる
[0041] 図 5は、ソースコードの生成に使用されるクラス図の例である。クラス図ファイル 121 は、モデルファイル記憶部 120に格納されている。クラス図ファイル 121には、クラス 1 21a, 121b, 121c, 121d, 121e, 121f力記述されている。
[0042] それぞれのクラスの上側の矩形内に記述された語力 そのクラスのクラス名である。
例えば、クラス 121bのクラス名は"伝票"である。ただし、 "くく main> > "および "く く table > > "は、ステレオタイプである。ステレオタイプとは、クラスに他のクラスと区 別して特別な意味をもたせる場合に使用する付加的情報である。図 5のステレオタイ プ" < <main> > "は、クラス 121aがプログラムによる処理の開始点であることを示 す。また、ステレオタイプ" < < table > > "は、クラス 12 Ifがデータベースのテープ ルを表現するクラスであることを示す。
[0043] クラス図では、クラス間の関係を表現するために矢印が使用される。例えば、クラス 1 21cとクラス 121d, 121eとの間の矢印は、汎化関係を意味する。汎化とは、複数のク ラスに共通する特徴を抽出し、上位概念のクラスを定義することである。図 5では、ク ラス 121dの"普通明細"とクラス 121eの"特殊明細"の上位概念力 クラス 121cの" 伝票明細"であることを意味している。図 5の他の矢印は、クラス間の参照関係を表し ている。
[0044] それぞれのクラスの下側の矩形内に記述されたリストが、そのクラスの属性である。
例えば、クラス 121bは、 "伝票番号"、 "取引先"、 "数量"の 3つの属性をもつ。それぞ れの属性の記述は、可視性、属性名、型の 3つ力 構成される。
[0045] 可視性は、その属性を参照することができるクラスの範囲を定義する。 "+ "が付さ れた属性は、どのクラスからも参照できる。 " # "が付された属性は、その属性をもつク ラスと、その属性をもつクラスの下位概念のクラス力も参照できる。例えば、クラス 121 cの属性"商品番号"は、下位概念であるクラス 121dから参照できる力 クラス 121b 力もは参照できない。 "—"が付された属性は、その属性をもつクラスからのみ参照で きる。
[0046] 型は、その属性に対応付けられるデータの種類を定義する。クラス図では、基本的 な型として、 "Boolean"、 "Integer", "Real", "String"の 4つの型を使用できる。 " Boolean"は、 "True" (真)または" False" (偽)の!、ずれかの値をとる型である。 "Int eger"は、整数の値をとる型である。 "Real"は、実数の値をとる型である。 "String" は、文字列の型である。 [0047] このようなクラス図によって、プログラム中で使用されるクラスの静的構造を表現でき る。
図 6は、ソースコードの生成に使用されるシーケンス図の例である。シーケンス図フ アイル 122は、モデルファイル記憶部 120に格納されている。シーケンス図ファイル 1 22には、クラス 121a, 121b, 121d, 121f力らそれぞれ生成された才ブジエタトの間 のメソッド呼び出し関係 122a, 122b, 122d, 122e, 122f力 ^記述されて!ヽる。
[0048] シーケンス図では、クラスから生成されるオブジェクトごとに、そのオブジェクトの生 存期間を示す縦方向の点線 (オブジェクト生存線)が記述される。オブジェクト生存線 の上側に記述された矩形がオブジェクトを意味する。例えば、図 6で最も左側に配置 された"受注 "オブジェクトは、クラス 121aから生成されたオブジェクトである。そして、 オブジェクト生存線上に配置された縦長の矩形の区間 (活性化区間)は、そのォブジ ェタトが処理を実行して 、る区間を意味する。
[0049] シーケンス図では、 2つのオブジェクト間のメソッド呼び出し関係は、横方向の矢印 によって表される。例えば、メソッド呼び出し関係 122bは、 "受注"オブジェクトから" 伝票 "オブジェクトへのメソッド呼び出しを意味する。そして、それぞれのメソッド呼び 出し関係に対してメソッド名が付与される。メソッド呼び出し関係 122bのメソッド名は、 "伝票作成"である。
[0050] なお、ステレオタイプ"くく create> > "および"くく SQL> > "が付与されたメソッ ド呼び出し関係は、他のメソッド呼び出し関係と区別されて特別な意味をもつ。ステレ ォタイプ"くく create > > "は、呼び出し元のオブジェクトが、呼び出し先のオブジェ タトを新規に生成することを意味する。例えば、メソッド呼び出し関係 122aは、 "受注" オブジェクトが、クラス 121bのオブジェクトを新規に生成することを意味する。
[0051] また、ステレオタイプ" < < SQL> > "は、呼び出し元のオブジェクトが、呼び出し先 のテーブルを操作することを意味する。ステレオタイプ"くく SQL > > "が付加され たメソッド呼び出し関係では、メソッド名によってテーブルに対する操作の種類が定義 される。具体的には、メソッド名として" SELECT" (データの検索)、" INSERT" (デ ータの追加)、 "UPDATE" (データの更新)、 "DELETE" (データの削除)のいずれ かを記述する。さらに、ステレオタイプ" < < SQL> > "が付加されたメソッド呼び出し 関係では、テーブル操作の条件の情報も付与しておく。例えば、メソッド呼び出し関 係 122fは、 "伝票"オブジェクトが"在庫"テーブルを検索することを意味する。
[0052] ここで、それぞれのメソッド呼び出し関係に対して、事前条件を示す制約式と事後 条件を示す制約式とを付加することができる。事前条件はメソッド呼び出しの直前に 成立しているべき条件であり、事後条件はメソッド呼び出しの直後に成立しているべ き条件である。事前条件の制約式は、 "pre : "の後ろに続けて記述する。事後条件の 制約式は、 "post : "の後ろに続けて記述する。複数の制約式を記述する場合は、論 理積の演算記号 (例えば、 "&")を使用してそれぞれの制約式を区切る。
[0053] メソッド呼び出し先のオブジェクトが他のオブジェクトへメソッド呼び出しを行って!/ヽ ない場合、そのメソッド呼び出し関係に対してさらに普遍条件を示す制約式を付加す ることができる。普遍条件は、メソッド呼び出しが行われてから、呼び出されたメソッド の実行が完了するまでの間成立しているべき条件である。普遍条件の制約式は、 "in V : "の後ろに続けて記述する。例えば、 "普通明細"オブジェクトは他のオブジェクトへ のメソッド呼び出しを行っていないので、メソッド呼び出し関係 122eに対して普遍条 件が設定されている。
[0054] 制約式は一階述語論理の記法に従って記述される。一階述語論理は、真か偽かを 判定できる文を組み合わせて知識を表現する表記法である。制約式として一階述語 論理を用いる場合、式全体が真となるように制約式の中の変数が束縛されることを意 味する。例えば、メソッド呼び出し関係 122bの事前条件は、 "特殊指定"の値が "Fal se"であることを規定する。また、メソッド呼び出し関係 122eの事前条件は、 "数量' " の値力 '数量"の値に 1をカ卩えた値に等しいことを規定する。ここで、変数"数量' "は、 変数"数量"に対する計算がなされた後の値を保持するための変数を意味する。
[0055] メソッド呼び出し関係 122eの普遍条件は、 "金額"の値が" 2000"より小さいときは、 "金額' "の値力 '金額"の値の 1. 1倍に等しいことを規定する。ここで、 "= > "は含意 を意味し、 "= > "の前に記述された式が真であるときは、必ず" = > "の後に記述さ れた式も真になることを意味する。メソッド呼び出し関係 122bの事後条件は、メソッド 呼び出し中に" Exception"という型のエラーが発生した場合は、 "= > "の後の式が 実行されることを規定する。ここで、 "catched"は、制約式がエラー処理に関する式 であることを明示するための特別な語である。
[0056] なお、一階述語論理では量子化記号によって処理の繰り返しを表現できる力 シー ケンス図の可読性が低下するおそれがあるため、量子化記号は使用しないこととする 。処理の繰り返しは、シーケンス図の表記法であるフレームを使って表現する。例え ば、フレーム 122cは、変数" i"の値が 0から 4までの間(すなわち、 5回)、メソッド呼び 出し関係 122dからメソッド呼び出し関係 122eまでの間の処理が繰り返されることを 意味する。
[0057] このようなシーケンス図によって、プログラム中で使用されるオブジェクト間のメソッド 呼び出し関係と、メソッド呼び出しの前後で成立すべき条件とを表現することができる
[0058] 次に、以上のような構成およびデータ構造のシステムにおいて実行される処理の詳 細を説明する。最初に、クラス図からクラス定義コードを生成する処理について説明 する。
図 7は、クラス定義生成処理の手順を示すフローチャートである。以下、図 7に示す 処理をステップ番号に沿って説明する。
[0059] [ステップ S11]クラス定義生成部 140は、クラス図に記述されたクラスの中から、ま だクラス定義コードを生成していないクラスを 1つ選択する。ただし、ステレオタイプ"
< < table > > "が付加されたクラスは選択しない。このクラスは、データベースのテ 一ブルを表現するための特別なクラスだ力もである。
[0060] [ステップ S 12]クラス定義生成部 140は、ステップ S 11で選択したクラスのクラス名 を抽出し、抽出したクラス名を含むクラス宣言文を作成する。 Javaの記述方法では、 " public class [クラス名] { } "がクラス宣言文となる。
[0061] [ステップ S 13]クラス定義生成部 140は、クラス図を参照し、ステップ S 11で選択し たクラスと汎化関係にある上位概念のクラスが存在するカゝ否カゝ判断する。存在する場 合には、処理がステップ S14に進められる。存在しない場合には、処理がステップ S 1
5に進められる。
[0062] [ステップ S 14]クラス定義生成部 140は、ステップ S 11で選択したクラスと汎化関係 にある上位概念のクラスのクラス名を抽出する。そして、クラス定義生成部 140は、抽 出したクラス名を含む継承の宣言文を、ステップ S 12で作成したクラス宣言文に挿入 する。 Javaの記述方法では、 "extends [親クラス名 ] "がステップ S 12で作成したク ラス宣言文のクラス名の後に挿入される。
[0063] [ステップ S 15]クラス定義生成部 140は、ステップ S 11で選択したクラスの属性を抽 出し、抽出した属性の可視性、属性名および型を含む属性宣言文を作成する。 Java の記述方法では、属性ごとに" [可視性] [型] [属性名] ; "の形式で属性宣言文が 作成される。ここで、可視性は、 " +,,が" public", " # "が" protected", "—"が" priv ate"にそれぞれ変換される。型は、 "Boolean,,力 ' boolean"、 "Integer "カ ' int"、 " Real"が" float"、 "String"が" String"にそれぞれ変換される。そして、クラス定義生 成部 140は、作成した属性宣言文をステップ S 13で作成したクラス宣言文に挿入す る。 Javaの記述方法では、中括弧の間に属性宣言文を挿入する。
[0064] [ステップ S16]クラス定義生成部 140は、クラス図に記述されたすベてのクラスにつ いて処理を行ったか否かを判断する。すべてのクラスを処理した場合には、処理が終 了する。まだ処理していないクラスが存在する場合には、処理がステップ S11に進め られる。
[0065] このようにして、クラス定義生成部 140は、クラス図に記述されたクラスごとに、クラス 宣言文と属性宣言文とを作成する。そして、クラス定義生成部 140は、クラス宣言文 に属性宣言文を挿入して、クラス定義コードを生成する。
[0066] 次に、シーケンス図からメソッド定義コードを生成する処理について説明する。
図 8は、メソッド定義生成処理の手順を示すフローチャートである。以下、図 8に示 す処理をステップ番号に沿って説明する。
[0067] [ステップ S21]メソッド定義生成部 150は、ステレオタイプ"くく main> > "が付カロ されたクラスから生成されたオブジェクト、すなわち、シーケンス図の最も左側に配置 され他のオブジェクトからのメソッド呼び出し先となって!/、な!/、オブジェクトを選択する 。そして、メソッド定義生成部 150は、選択したオブジェクトをメソッド呼び出し先とする 、メソッド名が" init"のメソッド呼び出し関係をシーケンス図に追加する。シーケンス図 では、最初に処理を開始するためのメソッド呼び出し関係が明示されないためである [0068] [ステップ S22]メソッド定義生成部 150は、シーケンス図に記述されたメソッド呼び 出し関係の中から、まだメソッド定義コードを生成して 、な 、メソッド呼び出し関係を 1 つ選択する。ただし、ステレオタイプ" < < create > > "または" < < SQL > > "が付 カロされたメソッド呼び出し関係は選択しない。このメソッド呼び出し関係は、メソッド呼 び出し先のオブジェクトに処理の実行を開始させる意味をもたないからである。
[0069] [ステップ S23]メソッド定義生成部 150は、ステップ S22で選択したメソッド呼び出し 関係のメソッド名を抽出し、抽出したメソッド名を含むメソッド宣言文を作成する。 Java の記述方法では、 " public void [メソッド名] ( ) { } "がメソッド宣言文となる。なお 、メソッドに戻り値が設定されている場合は、上記の" void"に代えて、戻り値の型を記 述する。また、メソッドに引数が設定されている場合は、メソッド名の後の括弧の間に 、引数の型と引数名とを記述する。
[0070] [ステップ S24]メソッド定義生成部 150は、シーケンス図を参照し、メソッド呼び出し によって開始される活性ィ匕区間内に、さらに他のオブジェクトへのメソッド呼び出し関 係が存在するか否かを判断する。メソッド呼び出し関係が存在する場合には、処理が ステップ S25へ進められる。メソッド呼び出し関係が存在しない場合には、処理がス テツプ S29へ進められる。
[0071] [ステップ S25]メソッド定義生成部 150は、メソッド呼び出しによって開始される活 性ィ匕区間を下方向に向力つて迪り、次のメソッド呼び出し関係を 1つ選択する。そして 、メソッド定義生成部 150は、選択したメソッド呼び出し関係に事前条件が付加されて V、る場合、事前条件の制約式をプログラミング言語で記述される計算式に変換する。 制約式力も計算式への具体的な変換方法は後で説明する。その後、メソッド定義生 成部 150は、上記の変換した計算式を、ステップ S23で作成したメソッド宣言文の中 括弧の中の最後尾に挿入する。なお、メソッド呼び出し関係の前に繰り返し処理の開 始線がある場合には、事前条件の計算式の前に、繰り返し処理を開始する計算式を メソッド宣言文に挿入する。例えば、 Javaの記述方法では、 "int i=0 ;i< 5 ;i+ + " という繰り返し条件が付加された繰り返し処理の開始線は、 "for (int i=0 ;i< 5 ;i+ + ) {"という計算式に変換される。
[0072] [ステップ S26]メソッド定義生成部 150は、ステップ S25で選択したメソッド呼び出し 関係のメソッド名と、メソッド呼び出し先のオブジェクトのクラス名とを抽出する。そして
、メソッド定義生成部 150は、抽出したメソッド名とクラス名とから、メソッド呼び出しの 計算式を作成する。メソッド呼び出しの計算式の具体的な作成方法は後で説明する 。その後、メソッド定義生成部 150は、作成した計算式を、ステップ S23で作成したメ ソッド宣言文の中括弧の中の最後尾に挿入する。
[0073] [ステップ S27]メソッド定義生成部 150は、ステップ S25で選択したメソッド呼び出し 関係に事後条件が付加されている場合、事後条件の制約式をプログラミング言語で 記述される計算式に変換する。制約式から計算式への変換方法は、ステップ S25の 事前条件の場合と同様である。そして、メソッド定義生成部 150は、変換した計算式 を、ステップ S23で作成したメソッド宣言文の中括弧の中の最後尾に挿入する。なお 、メソッド呼び出し関係の後に繰り返し処理の終了線がある場合には、繰り返し処理 を終了する計算式をさらにメソッド宣言文に挿入する。 Javaの記述方法では、繰り返 し処理の終了線は、 "}"に変換される。
[0074] [ステップ S28]メソッド定義生成部 150は、現在迪つている活性ィ匕区間の下側に、 さらにメソッド呼び出し関係が存在するか否かを判断する。メソッド呼び出し関係が存 在する場合には、処理がステップ S25に進められる。メソッド呼び出し関係が存在し な 、場合には、処理がステップ S 30に進められる。
[0075] [ステップ S29]メソッド定義生成部 150は、ステップ S22で選択したメソッド呼び出し 関係に普遍条件が付加されている場合、普遍条件の制約式をプログラミング言語で 記述される計算式に変換する。制約式から計算式への変換方法は、ステップ S25の 事前条件の場合と同様である。そして、メソッド定義生成部 150は、変換した計算式 を、ステップ S23で作成したメソッド宣言文の中括弧の中の最後尾に挿入する。
[0076] [ステップ S30]メソッド定義生成部 150は、シーケンス図に記述されたすベてのメソ ッド呼び出し関係にっ 、て処理を行ったか否かを判断する。すべてのメソッド呼び出 し関係を処理した場合には、処理が終了する。まだ処理していないメソッド呼び出し 関係が存在する場合には、処理がステップ S22に進められる。
[0077] ここで、ステップ S25で行われる制約式力も計算式への変換の方法は、以下の通り である。制約式で用いられる" = "は、計算式の代入文に変換する。制約式で用いら れる変数名は、原則としてそのまま計算式でも使用する。ただし、 "' "が付加された変 数は、 "' "を除去して使用する。制約式で用いられる和(" + ")や積(" * ")などの演 算子は、対応するプログラミング言語の演算子に変換する。制約式で用いられる含意 は、 "= > "の前に記述された式を条件とする条件分岐の計算式に変換する。 Javaの 記述方法では、例えば、制約式 "X= >Y"は計算式" if (X) {Y; } "に変換される。た だし、 "catched"が付加されている場合は、 "catch (X) {Y; } "に変換される。
[0078] また、ステップ S26で行われるメソッド呼び出しを示す計算式の作成の方法は、以 下の通りである。ステレオタイプが付加されていないメソッド呼び出し関係の場合、ォ ブジェクト間の通常のメソッド呼び出しの計算式が作成される。 Javaの記述方法では 、 " [オブジェクト変数名] . [メソッド名] ();"が計算式となる。オブジェ外変数名は、 例えば、 "obj— [クラス名] "とする。
[0079] ステレオタイプ" < < create > > "が付加されたメソッド呼び出し関係の場合、ォブ ジェタトを新規に生成する計算式が作成される。 Javaの記述方法では、 " [クラス名] [オブジェ外変数名 ] =new [クラス名 ] (); "が計算式となる。
[0080] ステレオタイプ "くく SQL > > "が付加されたメソッド呼び出し関係の場合、データ ベースのテーブルを操作する計算式が作成される。この場合、メソッド名、クラス名、 および、メソッド呼び出し関係に付加されたテーブル操作の条件を示す情報とから、 SQL (Structured Query Language)で記述された命令文が作成される。例えば、メソ ッド名が" SELECT"、クラス名力 '在庫"、テーブル操作の条件が"在庫数 where 在庫 ID= ' 1234' "である場合、" SELECT 在庫数 from 在庫 where 在庫 ID = ' 1234' "という命令文が作成される。これは、 "在庫"テーブルから、 "在庫 ID"が" 1234"であるデータの"在庫数"を取得するための命令文である。メソッド名が" INS ERT"、 "UPDATE", "DELETE"である場合も、同様に命令文が作成される。
[0081] このようにして、メソッド定義生成部 150は、シーケンス図に記述されたメソッド呼び 出し関係ごとに、事前条件、事後条件または普遍条件から作成される計算式を備え るメソッド定義コードを生成する。
[0082] 次に、クラス定義コードとメソッド定義コードとを合成してクラスのソースコードを生成 する処理につ!、て説明する。 図 9は、クラスコード生成処理の手順を示すフローチャートである。以下、図 9に示 す処理をステップ番号に沿って説明する。
[0083] [ステップ S31]クラスコード生成部 160は、クラス定義生成部 140が生成した複数 のクラス定義コードの中から 1つを選択し、クラス定義コードに記述されたクラス名から クラスを特定する。
[0084] [ステップ S32]クラスコード生成部 160は、メソッド定義生成部 150から受け取った シーケンス図を参照して、ステップ S31で特定したクラスに属するメソッドを特定する。 ここで、クラスに属するメソッドとは、クラス力 生成されるオブジェクトがメソッド呼び出 し先となっているメソッド呼び出し関係によって表されるメソッドである。そして、クラス コード生成部 160は、特定したメソッドに対応するメソッド定義コードを抽出し、抽出し たすベてのメソッド定義コードを、ステップ S31で選択したクラス定義コードの所定の 位置に挿入する。 Javaの記述方法では、クラス定義コードの中括弧の中の最後尾に メソッド定義コードを挿入する。
[0085] [ステップ S33]クラスコード生成部 160は、クラス定義生成部 140から受け取ったク ラス図を参照して、ステップ S31で特定したクラスがステレオタイプ" < <main> >" を有するか否かを判断する。ステレオタイプ" < <main> > "を有する場合には、処 理がステップ S34へ進められる。ステレオタイプ" < <main> > "を有さない場合に は、処理がステップ S35へ進められる。
[0086] [ステップ S34]クラスコード生成部 160は、ステップ S31で選択したクラス定義コー ドに、メインメソッドを挿入する。メインメソッドとは、プログラムによる処理の開始時に 実行される特別なメソッドである。ここで、前述の通り、メソッド定義生成部 150によつ て" init"メソッドのメソッド定義コードが生成されて!、るので、メインメソッドの中に" init "メソッドを呼び出す計算式を記述する。これにより、ステップ S31で特定したクラスか ら処理が開始される。メインメソッドの挿入位置は、ステップ S32でメソッドを挿入する 位置と同じである。
[0087] [ステップ S35]クラスコード生成部 160は、クラス定義コードとメソッド定義コードとを 有するクラスソースコードをファイルへ出力する。
[ステップ S36]クラスコード生成部 160は、クラス定義生成部 140が生成したクラス 定義コードのすべてについて処理を行った力否かを判断する。すべてのクラス定義コ ードを処理した場合には、処理が終了する。処理していないクラス定義コードが存在 する場合には、処理がステップ S31へ進められる。
[0088] このようにして、クラスコード生成部 160は、クラスごとに、クラス定義生成部 140で 生成したクラス定義コードとメソッド定義生成部 150で生成したメソッド定義コードとを 合成して、クラスコードを生成する。
[0089] 次に、以上のような処理によって生成されるソースコードについて説明する。本実施 の形態で生成されるソースコードは、 Javaで記述されたものである。
図 10は、メソッド呼び出し元のソースコードの生成例を示す図である。ソースフアイ ル 171は、ソースファイル記憶部 170に格納されるファイルである。
[0090] ソースファイル 171に記述されたソースコードは、図 5のクラス 121aに対応するソー スコードである。クラス宣言文 171aは、クラス 121aのクラス名に基づいて生成される。 属性宣言文 171bは、クラス 121aの属性の記述に基づいて生成される。メソッド宣言 文 171cは、クラス 121aにステレオタイプ"くく main> > "が付加されているため、プ ログラム生成装置によって自動的に生成されるメソッド宣言文である。
[0091] 計算式 171dは、シーケンス図ファイル 122に記述されたメソッド呼び出し関係 122 aに基づいて生成される。計算式 171eは、事前条件と事後条件とが付加されたメソッ ド呼び出し関係 122bに基づいて生成される。ここで、 Javaでは、 "try"から" catch" までの間で発生したエラーに対して、 "catch"以下の計算式で示されるエラー処理 が実行される。メソッド定義コード 171fは、クラス 12 laにステレオタイプ" < < main > > "が付加されているため、プログラム生成装置によって自動的に生成されるメインメ ソッドの定義コードである。
[0092] ソースファイル 171のメインメソッドでは、クラス 121aのオブジェクトが生成され、そ の後" init"メソッドが呼び出されている。これにより、シーケンス図ファイル 122で示さ れる処理が開始される。そして、 "受注"オブジェクトから"伝票"オブジェクトへメソッド 呼び出しが行われる。
[0093] 図 11は、メソッド呼び出し先のソースコードの生成例を示す図である。ソースフアイ ル 172は、ソースファイル記憶部 170に格納されるファイルである。 ソースファイル 172に記述されたソースコードは、図 5のクラス 121bに対応するソー スコードである。クラス宣言文 172aは、クラス 121bのクラス名に基づいて生成される 。属性宣言文 172bは、クラス 12 lbの属性の記述に基づいて生成される。
[0094] メソッド宣言文 172cは、シーケンス図ファイル 122に記述されたメソッド呼び出し関 係 122bのメソッド名に基づいて生成される。計算式 172dは、処理の繰り返しを示す フレーム 122cに基づいて生成される。これにより、計算式 172eから計算式 172fまで の処理が繰り返される。計算式 172eは、メソッド呼び出し関係 122dに基づいて生成 される。計算式 172fは、事前条件が付加されたメソッド呼び出し関係 122eに基づい て生成される。なお、メソッド呼び出し関係 122eに付加された普遍条件は、メソッド呼 び出し先である"普通明細"のクラス 121dのメソッドに反映される。計算式 172gは、メ ソッド呼び出し関係 122fに基づいて生成される。
[0095] "伝票"オブジェクトは、 "受注"オブジェクトからメソッド呼び出しがあると、 "伝票作 成"メソッドに記述された処理が実行される。そして、 "伝票 "オブジェクトは、 "伝票作 成"メソッドの中でさらに"普通明細"オブジェクトへのメソッド呼び出しを行う。
[0096] このようなプログラム生成装置を用いることで、開発者はクラス図とシーケンス図とか ら、プログラムによる処理の具体的な計算手順を含むソースコードを生成することが できる。したがって、開発者はソースコードを直接記述する必要がなくなり、クラス図と シーケンス図の記述に集中することができる。
[0097] 本実施の形態に係るプログラム生成装置は、特定のモデル記述言語ゃプログラミン グ言語に依存しておらず、さまざまなモデル記述言語やプログラミング言語への応用 が容易である。また、データベースのテーブルを操作するプログラムに限らず、さまざ まな種類のプログラムの生成に応用が可能である。
[0098] なお、本実施の形態では、階層化されていないシーケンス図を使用したが、階層化 されたシーケンス図を使用してもよい。すなわち、複数のオブジェクト間のメソッド呼び 出し関係が複雑である場合、 1つのシーケンス図の活性ィ匕区間内で行われる処理の 詳細が、別のシーケンス図に展開されて記述されていてもよい。この場合、下位のシ 一ケンス図があるときは、普遍条件の制約式に基づく計算式は生成しない。
[0099] 以上、本発明のソースコード生成プログラム、ソースコード生成方法およびソースコ ード生成装置を、図示の実施の形態に基づいて説明したが、本発明はこれに限定さ れるものではなぐ各部の構成は、同様の機能を有する任意の構成のものに置換す ることができる。また、本発明に、他の任意の構成物や工程が付加されていてもよい。
[0100] また、本発明は、前述した実施の形態のうちの、任意の 2以上の構成 (特徴)を組み 合わせたものであってもよ 、。
なお、上記の処理機能は、汎用的なコンピュータによって実現することができる。そ の場合、開発用コンピュータ 100が有すべき機能の処理内容を記述したプログラム が提供される。そのプログラムをコンピュータで実行することにより、上記処理機能が コンピュータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み 取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記 録媒体としては、例えば、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモ リなどが挙げられる。磁気記録装置としては、例えば、ハードディスク装置 (HDD)、 フレキシブルディスク(FD)、磁気テープなどが挙げられる。光ディスクとしては、例え ば、 DVD (Digital Versatile Disc)、 DVD -RAM (Random Access Memory)、 CD- ROM (Compact Disc Read Only Memory)ゝ CD— R (Recordable) /RW (Rewritable )などが挙げられる。光磁気記録媒体としては、例えば、 MO (Magneto-Optical disk) などが挙げられる。
[0101] プログラムを流通させる場合には、例えば、そのプログラムが記録された DVD、 CD —ROMなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータ の記憶装置に格納しておき、ネットワークを介して、サーバコンピュータ力 他のコン ピュータにそのプログラムを転送することもできる。
[0102] ソースコード生成プログラムを実行するコンピュータは、例えば、可搬型記録媒体に 記録されたプログラムもしくはサーバコンピュータ力も転送されたプログラムを、自己 の記憶装置に格納する。そして、コンピュータは、自己の記憶装置からプログラムを 読み取り、プログラムに従った処理を実行する。なお、コンピュータは、可搬型記録媒 体から直接プログラムを読み取り、そのプログラムに従った処理を実行することもでき る。また、コンピュータは、サーバコンピュータ力もプログラムが転送されるごとに、逐 次、受け取ったプログラムに従った処理を実行することもできる。 [0103] 上記については単に本発明の原理を示すものである。さらに、多数の変形、変更が 当業者にとって可能であり、本発明は上記に示し、説明した正確な構成および応用 例に限定されるものではなぐ対応するすべての変形例および均等物は、添付の請 求項およびその均等物による本発明の範囲とみなされる。
符号の説明
[0104] 1 コンピュータ
la モデル記憶手段
lb クラス定義生成手段
lc メソッド定義生成手段
Id クラスコード生成手段
2 クラス図
2a, 2b クラス
3 シーケンス図
3a 制約式
4a, 4b ソースコード

Claims

請求の範囲
[1] オブジェクト指向のモデルからプログラムのソースコードを生成するソースコード生 成プログラムにおいて、
コンピュータを、
プログラム中で使用されるオブジェクトの属性をクラスごとに記述したクラス図と、プ ログラム中で使用される変数についての制約条件を示す制約式カ ソッド呼び出し 関係に対して付加されたシーケンス図とを記憶するモデル記憶手段、
前記モデル記憶手段に記憶された前記クラス図を参照して、前記クラス図に記述さ れたクラスごとに、前記クラスを宣言するクラス宣言文と、前記クラスの属性を宣言す る属性宣言文とを備えるクラス定義コードを生成するクラス定義生成手段、
前記モデル記憶手段に記憶された前記シーケンス図を参照して、前記シーケンス 図に記述された前記メソッド呼び出し関係ごとに、前記メソッド呼び出し関係に付加さ れた前記制約式をプログラムの処理内容を示す処理コードに変換し、メソッドを宣言 するメソッド宣言文と変換した前記処理コードとを備えるメソッド定義コードを生成する メソッド定義生成手段、
前記シーケンス図を参照して、前記メソッド定義生成手段で生成した前記メソッド定 義コードをメソッドが属するクラスごとに分類すると共に、前記クラス定義生成手段で 生成した前記クラス定義コードと、前記クラス定義コードで示されるクラスに属するす ベての前記メソッド定義コードとを合成して、前記クラスのソースコードを出力するクラ スコード生成手段、
として機能させることを特徴とするソースコード生成プログラム。
[2] 前記制約式は、メソッド呼び出しの直前に満たすべき条件を示す事前条件と、前記 メソッド呼び出しの直後に満たすべき条件を示す事後条件とを有し、
前記メソッド定義生成手段は、前記事前条件を満たすために必要な前処理コードと 、前記事後条件を満たすために必要な後処理コードとを生成し、生成した前記前処 理コードと前記後処理コードとを備える前記メソッド定義コードを、メソッド呼び出し元 のクラスに属するメソッドのメソッド定義コードとして生成する、
ことを特徴とする請求の範囲第 1項記載のソースコード生成プログラム。
[3] 前記制約式は、メソッド呼び出しが行われて 、る間に満たすべき条件を示す普遍 条件を有し、
前記メソッド定義生成手段は、前記普遍条件を満たすために必要な中間処理コー ドを生成し、生成した前記中間処理コードを備える前記メソッド定義コードを、メソッド 呼び出し先のクラスに属するメソッドのメソッド定義コードとして生成する、
ことを特徴とする請求の範囲第 1項記載のソースコード生成プログラム。
[4] 前記メソッド定義生成手段は、前記制約式が等号記号を含む場合、前記等号記号 の右辺の式を前記等号記号の左辺の式へ代入する代入文の処理コードに変換する ことを特徴とする請求の範囲第 1項記載のソースコード生成プログラム。
[5] 前記メソッド定義生成手段は、前記制約式が含意記号を含む場合、前記含意記号 の左辺の式を分岐条件の式と判定し、前記分岐条件が満たされるとき前記含意記号 の右辺の式を実行する条件分岐の処理コードに変換する、
ことを特徴とする請求の範囲第 1項記載のソースコード生成プログラム。
[6] オブジェクト指向のモデルからプログラムのソースコードを生成するソースコード生 成方法において、
クラス定義生成手段が、プログラム中で使用されるオブジェクトの属性をクラスごとに 記述したクラス図がモデル記憶手段に記憶されており、前記モデル記憶手段に記憶 された前記クラス図を参照して、前記クラス図に記述されたクラスごとに、前記クラスを 宣言するクラス宣言文と、前記クラスの属性を宣言する属性宣言文とを備えるクラス 定義コードを生成し、
メソッド定義生成手段力 プログラム中で使用される変数についての制約条件を示 す制約式カ ソッド呼び出し関係に対して付加されたシーケンス図が前記モデル記 憶手段に記憶されており、前記モデル記憶手段に記憶された前記シーケンス図を参 照して、前記シーケンス図に記述された前記メソッド呼び出し関係ごとに、前記メソッ ド呼び出し関係に付加された前記制約式をプログラムの処理内容を示す処理コード に変換し、メソッドを宣言するメソッド宣言文と変換した前記処理コードとを備えるメソ ッド定義コードを生成し、 クラスコード生成手段が、前記シーケンス図を参照して、前記メソッド定義生成手段 で生成した前記メソッド定義コードをメソッドが属するクラスごとに分類すると共に、前 記クラス定義生成手段で生成した前記クラス定義コードと、前記クラス定義コードで示 されるクラスに属するすべての前記メソッド定義コードとを合成して、前記クラスのソー スコードを出力する、
ことを特徴とするソースコード生成方法。
オブジェクト指向のモデルからプログラムのソースコードを生成するソースコード生 成装置において、
プログラム中で使用されるオブジェクトの属性をクラスごとに記述したクラス図と、プ ログラム中で使用される変数についての制約条件を示す制約式カ ソッド呼び出し 関係に対して付加されたシーケンス図とを記憶するモデル記憶手段と、
前記モデル記憶手段に記憶された前記クラス図を参照して、前記クラス図に記述さ れたクラスごとに、前記クラスを宣言するクラス宣言文と、前記クラスの属性を宣言す る属性宣言文とを備えるクラス定義コードを生成するクラス定義生成手段と、 前記モデル記憶手段に記憶された前記シーケンス図を参照して、前記シーケンス 図に記述された前記メソッド呼び出し関係ごとに、前記メソッド呼び出し関係に付加さ れた前記制約式をプログラムの処理内容を示す処理コードに変換し、メソッドを宣言 するメソッド宣言文と変換した前記処理コードとを備えるメソッド定義コードを生成する メソッド定義生成手段と、
前記シーケンス図を参照して、前記メソッド定義生成手段で生成した前記メソッド定 義コードをメソッドが属するクラスごとに分類すると共に、前記クラス定義生成手段で 生成した前記クラス定義コードと、前記クラス定義コードで示されるクラスに属するす ベての前記メソッド定義コードとを合成して、前記クラスのソースコードを出力するクラ スコード生成手段と、
を有することを特徴とするソースコード生成装置。
PCT/JP2006/306901 2006-03-31 2006-03-31 ソースコード生成プログラム、ソースコード生成方法およびソースコード生成装置 WO2007116490A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2006/306901 WO2007116490A1 (ja) 2006-03-31 2006-03-31 ソースコード生成プログラム、ソースコード生成方法およびソースコード生成装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2006/306901 WO2007116490A1 (ja) 2006-03-31 2006-03-31 ソースコード生成プログラム、ソースコード生成方法およびソースコード生成装置

Publications (1)

Publication Number Publication Date
WO2007116490A1 true WO2007116490A1 (ja) 2007-10-18

Family

ID=38580799

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/306901 WO2007116490A1 (ja) 2006-03-31 2006-03-31 ソースコード生成プログラム、ソースコード生成方法およびソースコード生成装置

Country Status (1)

Country Link
WO (1) WO2007116490A1 (ja)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010198494A (ja) * 2009-02-26 2010-09-09 Panasonic Corp ソフトウェア開発支援ツール
JP2011013810A (ja) * 2009-06-30 2011-01-20 Internatl Business Mach Corp <Ibm> 文字列の妥当性を判定するシステム、方法及びプログラム
US8528095B2 (en) 2010-06-28 2013-09-03 International Business Machines Corporation Injection context based static analysis of computer software applications
US8584246B2 (en) 2009-10-13 2013-11-12 International Business Machines Corporation Eliminating false reports of security vulnerabilities when testing computer software
JP2016201009A (ja) * 2015-04-13 2016-12-01 三菱電機株式会社 ソースコード生成システム、ソースコード生成装置、ソースコード生成方法及びプログラム

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CHUJO M.: "Eclipse Jo ni Zen Kino o Tosai shita IBM no Kaihatsu Tool Shin Version", NIKKEI SOFTWARE, 24 January 2005 (2005-01-24), XP003018508 *
HABU E.: "Object Shiko ni Motoduku System Zukai no Hyokiho o Togo", NIKKEI ELECTRONICS, vol. 698, 8 September 1997 (1997-09-08), pages 131 - 145, XP003018511 *
SHIMOMURA K.: "Programming Shien no tameno UML kara Java Source Code eno Henkan Kisoku no Chushutsu", IEICE TECHNICAL REPORT (SS 2004-47), 13 January 2005 (2005-01-13), XP003018509 *
YAMADA R.: "Kyoka sareta UML no Jitsuryoku o Saguru UML 2.0 no Subete", JAVA DEVELOPER, vol. 17, 1 December 2003 (2003-12-01), pages 40 - 48, XP003018510 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010198494A (ja) * 2009-02-26 2010-09-09 Panasonic Corp ソフトウェア開発支援ツール
JP2011013810A (ja) * 2009-06-30 2011-01-20 Internatl Business Mach Corp <Ibm> 文字列の妥当性を判定するシステム、方法及びプログラム
US8584246B2 (en) 2009-10-13 2013-11-12 International Business Machines Corporation Eliminating false reports of security vulnerabilities when testing computer software
US8528095B2 (en) 2010-06-28 2013-09-03 International Business Machines Corporation Injection context based static analysis of computer software applications
JP2016201009A (ja) * 2015-04-13 2016-12-01 三菱電機株式会社 ソースコード生成システム、ソースコード生成装置、ソースコード生成方法及びプログラム

Similar Documents

Publication Publication Date Title
US7930182B2 (en) Computer-implemented tool for creation of speech application code and associated functional specification
Vanderdonckt Model-driven engineering of user interfaces: Promises, successes, failures, and challenges
US7877680B2 (en) Auto-generation and auto-versioning of a multi-sourced dynamic document
KR100692172B1 (ko) 종합 문자열 분석기 및 그 분석 방법
US20120079463A1 (en) Automatic synchronous-to-asynchronous software application converter
US20100077386A1 (en) System and a method for cross-platform porting of business applications and making them contexually-aware on target platforms
US9524279B2 (en) Help document animated visualization
US20100011338A1 (en) Methods and tools for data-driven application engineering
US20070079299A1 (en) Method, apparatus and program storage device for representing eclipse modeling framework (EMF) ecore models in textual form
US20070039010A1 (en) Automatic generation of software code to facilitate interoperability
Brown et al. On components and objects: the foundations of component-based development
EP1739551A1 (fr) Procédé de traitement de données compatible avec un formalisme de modélisation d&#39;objets
JP2012221380A (ja) 自動プログラム生成装置、方法及びコンピュータプログラム
US7752596B2 (en) Connecting alternative development environment to interpretive runtime engine
Sanchez et al. Towards a clean architecture for android apps using model transformations
WO2007116490A1 (ja) ソースコード生成プログラム、ソースコード生成方法およびソースコード生成装置
Meier et al. Classifying approaches for constructing single underlying models
JP4652680B2 (ja) コンパイル方法および装置、ならびにコンパイラ
US20050137852A1 (en) Integrated visual and language- based system and method for reusable data transformations
Lachgar et al. Modeling and generating native code for cross-platform mobile applications using DSL
Irwin et al. Object oriented metrics: Precision tools and configurable visualisations
Kongdenfha et al. Web service adaptation: Mismatch patterns and semi-automated approach to mismatch identification and adapter development
Plasil et al. Getting'Whole picture'behavior in a use case model
Dori et al. An OPM-based metamodel of system development process
KR100846203B1 (ko) 모바일 어플리케이션의 생성 방법 및 이를 구현하기 위한프로그램을 기록한 기록매체

Legal Events

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

Ref document number: 06730849

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06730849

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP