Compiling method from intermediate language (IL) program to C language program of instruction list

A compiling method and C language technology, applied in the field of compiling programming language instruction list IL programs to C language programs, to achieve the effects of less resource occupation, strong portability, and reduced compilation complexity

Inactive Publication Date: 2013-05-29
中国科学院沈阳计算技术研究所有限公司
View PDF2 Cites 27 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] For above-mentioned problem, the present invention proposes a kind of instruction list IL program to the compiling method of C language program, mainly solved the logical composition analysis to IL language in compiling process, the establishment of intermediate grammatical structure, the process...

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
  • Compiling method from intermediate language (IL) program to C language program of instruction list
  • Compiling method from intermediate language (IL) program to C language program of instruction list
  • Compiling method from intermediate language (IL) program to C language program of instruction list

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] Below in conjunction with illustrating the scheme of the present invention further detailed description:

[0021] see figure 1 , the compiling method of instruction list IL program to C language program, it is characterized in that: comprise steps as follows:

[0022] Use the lexical analysis program to scan the instruction list program and send the recognized and classified vocabulary to the grammar analysis. The grammar analysis uses yacc to perform grammatical reduction on the program segments and statements that conform to the logic of the instruction list, and establish an intermediate storage structure grammar for the grammatical reduction results. Tree, the structure is based on the semantic mapping obtained from the logical consistency analysis of the logical composition of the instruction list and the logical composition of the C language, and generates a C language program by combining auxiliary function modules of functions and function blocks and auxiliary f...

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

The invention discloses a compiling method from an intermediate language (IL) program to a C language program of an instruction list. The method comprises the steps: building a middle storage structure syntax tree according to results of lexical analysis and grammatical analysis through logical analysis on a program of the instruction list and logistic mapping relation between semanteme of the instruction list and semanteme of the C language; combining an auxiliary performance function and an auxiliary data structure define file, and generating an integrated file of the C language program through program data of an original instruction list according to a C language programming method, wherein the program data of the original instruction list is stored in the structure of the syntax tree. The generated C language program completely corresponds to the logic program of the original instruction list and has the advantages of a high-level C language, wherein the advantages include strong transportability, strong compatibility and the like. Due to the structure of the syntax tree and an analytic method of semanteme mapping, compiling is standardized and mass-produced, complexity of the compiling is reduced through adoption of functions and modularization of an auxiliary function of a function block, compiling time is shortened, and speed of the whole compiling process is improved.

Description

technical field [0001] The invention relates to the technical field of compiling programmable logic controllers, in particular to a compiling method from an IL program of a PLC programming language instruction table to a C language program. Background technique [0002] Soft PLC technology is widely used in industrial control, but each manufacturer or research unit develops the compiling and executing technology of PLC program for a specific system environment. This compilation technology for a single operating environment lacks versatility and compatibility, and cannot be transplanted to other computing environments. Therefore, a compiling technology with strong portability and good compatibility has become an urgent need for the development of soft PLC technology. The instruction list conforming to the IEC61131-3 standard is a text-based programming language commonly used in soft PLC programming. C language is a programming language adopted by various computer systems. It...

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
IPC IPC(8): G06F9/45
Inventor 高丽李忠琪杨东升刘荫忠
Owner 中国科学院沈阳计算技术研究所有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products