Supercharge Your Innovation With Domain-Expert AI Agents!

Method for automatic converting program language in higher level to activity diagram

A programming language and automatic conversion technology, applied in the direction of program control devices, etc., can solve the problems of hardware component design problems, design problems, and inability to directly convert into hardware description language.

Inactive Publication Date: 2009-03-11
TATUNG COMPANY +1
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Traditional hardware description languages ​​(such as: VHDL) are not suitable for directly describing the program logic and execution flow of high-level programming languages. Therefore, when designing hardware description conditions, they cannot directly correspond to the processes designed by high-level programming languages. Therefore, In addition, traditional high-level programming languages ​​cannot be directly converted into hardware description languages ​​(such as: VHDL), which also causes inconvenience in design, and because there are many types of high-level programming languages, such as: Java, C, or C++, etc., so although the functions of the designed programs are the same, the complete execution process cannot be unified due to the characteristics of the programming language, causing troubles in the design of hardware components. Therefore, the existing methods cannot directly integrate high-level programming languages Converted into a hardware description language, so it is necessary to improve

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for automatic converting program language in higher level to activity diagram
  • Method for automatic converting program language in higher level to activity diagram
  • Method for automatic converting program language in higher level to activity diagram

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0063] Example 1 For Statement conversion:

[0064] Its syntax is as follows, please refer to Figure 4a Shown:

[0065] for([ForInit()]; [Expression()]; [ForUpdate()])Statement()

[0066] It is described as follows with a Java source code:

[0067]

[0068] The above Java source code conversion process is as follows:

[0069] step1: Parsing "for" and "(";

[0070] step2: Analyze (For Init()), draw the node represented by circle 1 in the figure, set In-Node and Out-Node, and connect online;

[0071] step3: parse ";";

[0072] step4: Analyze (Expression()) execute the newly added java program processConditionExpression(), generate Decode Node (D), and generate the wiring below the Decode node and the edge label on it

[0073] Completely draw the subgraph (a collection of nodes) represented by circle 2 in the figure, and set the In-Node and Out-Node;

[0074] step5: parse ";";

[0075] step6: Analyze (ForUpdate), draw the node represented by circle 3 in the figure;

...

example 2

[0084] Example 2 Conversion of While Statement:

[0085] Its syntax is as follows,

[0086] while(Expression())Statement()

[0087] Here is a Java source code conversion description as follows:

[0088]

[0089] The conversion process is as follows, please refer to Figure 4b Shown:

[0090] step1: Analyze "while" and "(";

[0091] Step2: Analyze Expression(), and generate circle 1 in the figure, and obtain the Out-Node of the sub-graph;

[0092] Step3: Execute the newly added java program processConditionExpression(), generate Decode Node (D), and generate the wiring below the Decode node and the edge label on it, and completely draw the subgraph represented by circle 2 in the figure (node set), set In-Node and Out-Node;

[0093] step4: connect the Out-Node of circle 2 (Expression()) and the In-Node of circle 1 (Statement());

[0094] step5: generate a Merge node, as shown in circle 3;

[0095] step6: connect the Out-Node of circle 1 (Statement()) to the Merge node...

example 3

[0098] Example 3 Conversion of Do Statement:

[0099] Its syntax is as follows,

[0100] do Statement() while(Expression());

[0101] Here is a Java source code conversion description as follows:

[0102]

[0103] The conversion process is as follows, please refer to Figure 4c Shown:

[0104] step1: parse "do";

[0105] Step2: Parse Statement() to generate as circle 1 in the figure, and obtain its Out-Node;

[0106] step3: Analyze "while" and "(";

[0107] Step4: Execute the newly added java program processConditionExpression(), generate DecodeNode(D), and generate the wiring below the Decode node and the edge label on it, and completely draw the subgraph represented by circle 2 in the figure (node's Collection), set In-Node and Out-Node;

[0108] step5: analyze ")" and ";";

[0109] step6: Connect the Out-Node of circle 1 (Expression()) and the In-Node of circle 2 (Statement());

[0110] step7: Generate a Merge node, as shown in circle 3;

[0111] step7: connect...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

A method for converting high order program language to be active diagram includes adding new conversion rule in compiler and revising specification of active diagram in UML program language to convert program original code to be corresponding active diagram for presenting program logic and execution process flow of original code in visible mode.

Description

technical field [0001] The invention relates to a method for automatically converting a high-level programming language into an activity diagram, especially a method for converting the source code of a high-level program into a corresponding activity diagram, and visually presenting the program logic and execution of the source code process. Background technique [0002] Traditional hardware description languages ​​(such as: VHDL) are not suitable for directly describing the program logic and execution flow of high-level programming languages. Therefore, when designing hardware description conditions, they cannot directly correspond to the processes designed by high-level programming languages. Therefore, In addition, traditional high-level programming languages ​​cannot be directly converted into hardware description languages ​​(such as: VHDL), which also causes inconvenience in design, and because there are many types of high-level programming languages, such as: Java, C...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/44
Inventor 郑福炯颜宽裕陈建一张书铭王平云张立楷周锦泰江明修
Owner TATUNG COMPANY
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More