Model Library Consultation Solution Tool Course Member  
 
Order | Case| Learning Resources | Training & Consulting | Solution | Model Framework | User group | Customer Area | Contact us
作者:俎涛     
Code Engineer
Communicator
AUTOSAR Engineer
Videos & Articles

Product Description: Code Engineer
 
 
Author  Zu Tao
Date  December 27, 2022
 

Catalogue

User manual: Code Engineer

1. Introduction to the Code Engineer

2. Model generates C code

3.Go language code reverse model

4. Model-based code positioning and editing

5. Provide the ability of structural model and behavioral model to locate each other

6. Generate executable code based on the state diagram and perform test verification

1. Introduction to the Code Engineer
Code Engineer is an EA plugin developed by Dragon Fruit Software to provide forward and reverse engineering support for models to C code. C language is a process-oriented language, so most UML modeling tools can only effectively reverse the model code of object-oriented languages such as C++ to the model, and lack the complete reverse function of C code. To this end, Code Engineer provides EA with forward and reverse engineering support for models oriented to C code. Specific functions are as follows:
The following provides a brief introduction to the functions of the Code Engineer, and provides related operation demonstration videos.
2.Model generates C code
Provides the model to generate C code forward function:
•  Generate C's structural code from the class diagram.
•  Generate C's process code from the activity diagram.
•  Generate C's event handling code from the state diagram.
Generate C structure code based on class diagram, including:
• Attributes of the class generate declarations of variables;
• The operation of the class generates the declaration of the function.
Generate C function implementation code based on activity diagram, including:
•  Assignment statement
•  Control statement
•  Function call
Generate C's event-based behavior code based on the state diagram, including:
• Status
• Events
• Operation
3、 C language code reverse model
Code Engineer for C provides the ability to reverse C code to models:
•  Reverse the program structure model from C structure code.
•  Function processing flowchart from C behavior code backwards.
•  Reverse the function call diagram from the behavior code.

Reverse the program structure model from C structure code, including:

•  Classes (attributes, operations)

•  Relationships between classes

Function processing flowcharts from C behavior code backwards, including:

•  Activity

•  Condition determination

•  Loop determination

•  Selection decision

Reverse the function call diagram from the behavior code, including:

•  Calls between functions

•  Function access variables

4. Model-based code positioning and editing
Provide mutual positioning of model and code to support developers' ability to quickly locate and understand code:
•  Allows developers to quickly locate code and edit code through the model.
•  You can also quickly locate the model through the code in order to fully understand the code through the model.
5. Provide the ability of structural model and behavioral model to locate each other
A complete understanding of software design requires a combination of static and dynamic views, so Code Engineer for C provides the ability to locate both static and dynamic models:
1) From static structure model positioning to dynamic behavior model, you can quickly understand:
•  The process model in which the properties in the structural model are instantiated as variables.
•  In which process models the operations in the structure are instantiated as activities.
2) From the dynamic behavior model to the static structure model, it can be quickly understood
•  Properties of structures from which the variables of behavior processing are derived;
•  The operations of structures from which the activities in the behavior processing are derived;
6. Generate executable code based on the state diagram and perform test verification

For highly reliable systems, the state machine is a normative form of software behavior design. If the executable Code can be generated from the state diagram, the efficiency and quality of development will be significantly improved. The state diagram, as the result of design, can also be used as the basis for testing, and the corresponding code can be verified based on the state diagram to realize the closed-loop design and verification of software. CodeEngineer supports developers with behavioral model-based development and testing:
1) Establish state model in EA;
2) Generate executable Code in Code Engineer;
3) Compile and generate "Executable Program";
4) Run "Executable Program" on the target machine;
5) Use state machine to test the program in CodeEngineer.

If you would like more information:
•  Visit the Modeler channel at http://www.sysml.org.cn/
•  Please contact us directly at teacher@uml.net.cn , 010-62670969