Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Script realization method using compiler

An implementation method and a compiler technology, applied in the field of industrial configuration software development and operation, can solve the problems of low operation efficiency, increase the difficulty of user learning, and inability to meet, and achieve the effect of improving execution efficiency, flexibility and scalability.

Active Publication Date: 2012-10-24
WUHAN LINCON AUTOMATION TECH
View PDF3 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The former increases the difficulty of learning for users, and users need to re-learn new scripting rules, and the grammar rules customized by the configuration software usually have relatively simple functions, which are difficult to compare with the functions provided by standard languages; while the latter also use standard languages Provides grammatical rules, but the problem is that user scripts are interpreted and executed at runtime, so the operating efficiency is usually low, and it cannot meet some industrial control applications that require relatively high speed.

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
  • Script realization method using compiler
  • Script realization method using compiler
  • Script realization method using compiler

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] The technical solution of the present invention will be described in detail below in conjunction with the drawings and embodiments.

[0032] The invention provides a script implementation method using a compiler. The method first preprocesses the script written by the user to generate a temporary file; then, uses the compiler to compile the temporary file generated by the script to generate a Finally, when the main program is running, the dynamic library is loaded, and when the main program needs to call the script, the script function corresponding to the script is found from the dynamic link library.

[0033] For ease of implementation reference, the following embodiments use the C language as the scripting language, and introduce the gcc compiler as the scripting compiler, but the present invention does not limit the scripting language and the compiler, that is, it is not limited to the C language and the gcc compiler . The specific steps of the embodiment are as 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 script realization method using a compiler. The method comprises the following steps of: firstly, preprocessing a script written by a user to generate a temporary file; then using the compiler to compile the temporary file generated by the script to generate a dynamic link library which can be called by a main program; finally when the main program is operated, loading the dynamic library; and when the main program needs to call the script, finding a script function corresponding to the script from the dynamic link library. The script of the user is directly compiled into an executable code through the method, and the execution efficiency of the program is increased compared with the traditional scheme for carrying out interpretive execution to the script. The user can be allowed to directly use various grammar rules of standard languages in the script, so that configuration software is simple and is easy to operate, and meanwhile, the flexibility and the expandability of the software are greatly increased.

Description

technical field [0001] The invention belongs to the technical field of development and operation of industrial configuration software, and in particular relates to a script realization method using a compiler. Background technique [0002] With the rapid improvement of industrial automation level and the wide application of computers in the industrial field, people have higher and higher requirements for industrial automation. The application of various control equipment and process monitoring devices in the industrial field makes industrial control software more and more complex. At this time, if the programming language is used to directly develop the system, although it can meet various complex requirements and ensure high enough execution efficiency, it faces problems such as difficult development, long development cycle, and poor code reusability. So configuration software came into being. Configuration software refers to some special software for data acquisition and...

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 WUHAN LINCON AUTOMATION TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products