CN112052006A - Software code compiling method and system - Google Patents

Software code compiling method and system Download PDF

Info

Publication number
CN112052006A
CN112052006A CN202010815520.3A CN202010815520A CN112052006A CN 112052006 A CN112052006 A CN 112052006A CN 202010815520 A CN202010815520 A CN 202010815520A CN 112052006 A CN112052006 A CN 112052006A
Authority
CN
China
Prior art keywords
code
package
file
application
application package
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010815520.3A
Other languages
Chinese (zh)
Other versions
CN112052006B (en
Inventor
董逢华
江俊
胡瑞璟
何涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Tianyu Julian Technology Co ltd
Wuhan Tianyu Information Industry Co Ltd
Original Assignee
Wuhan Tianyu Julian Technology Co ltd
Wuhan Tianyu Information Industry Co Ltd
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 Wuhan Tianyu Julian Technology Co ltd, Wuhan Tianyu Information Industry Co Ltd filed Critical Wuhan Tianyu Julian Technology Co ltd
Priority to CN202010815520.3A priority Critical patent/CN112052006B/en
Publication of CN112052006A publication Critical patent/CN112052006A/en
Application granted granted Critical
Publication of CN112052006B publication Critical patent/CN112052006B/en
Priority to PCT/CN2021/104177 priority patent/WO2022033229A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a software code compiling method and a system, which relate to the technical field of computers, and the method comprises the following steps: receiving an input code, extracting a word stream corresponding to the input code, generating a syntax tree according to a preset syntax rule, performing semantic analysis, and obtaining an object code, wherein the input code comprises an application package code and a reference package code, and the object code comprises an application package object code and a reference package object code; generating an application package byte code file according to data for realizing an application function in the application package target code; generating a reference package byte code file according to data for realizing interface calling in the reference package target code; and generating a download file according to the application package byte code file and the reference package byte code file. According to the method and the device, codes are compiled in advance, the download file convenient to analyze is generated, the requirement for resources is reduced in embedded development, the performance requirement in embedded development is guaranteed, and the requirement that the download file can be executed in a cross-platform mode is met.

Description

Software code compiling method and system
Technical Field
The invention relates to the technical field of computers, in particular to a software code compiling method and system.
Background
In embedded development, the security module has the characteristics of limited resources and higher performance requirements, but the traditional language system cannot meet the changeable user use scenes of the embedded module, cannot meet the higher performance requirements under the condition of limited resources, and cannot meet the requirement that the same software code can run on different embedded modules.
Therefore, in order to solve the existing technical problem, a code compiling technology is needed to meet the technical requirements of the current embedded development.
Disclosure of Invention
The embodiment of the application provides a method and a system for compiling software codes, wherein the codes are compiled in advance to generate a download file which is convenient to analyze, the requirements on resources are reduced in embedded development, the performance requirements in the embedded development are guaranteed, and the requirement that the download file can be executed in a cross-platform mode can be met.
In a first aspect, a software code compiling method is provided, the method including the following steps:
receiving an input code, extracting a word stream corresponding to the input code, generating a syntax tree according to a preset syntax rule, performing semantic analysis, and obtaining an object code, wherein the input code comprises an application package code and a reference package code, the object code comprises an application package object code generated by the application package code and a reference package object code generated by the reference package code, and the application package code and the application package object code both comprise codes corresponding to runtime environment interfaces;
generating an application package byte code file according to the data for realizing the application function in the application package target code;
generating a reference package byte code file according to data for realizing interface calling in the reference package target code;
and generating a download file according to the application package byte code file and the reference package byte code file.
Specifically, the receiving an input code, extracting a word stream corresponding to the input code, generating a syntax tree according to a preset syntax rule, performing semantic analysis, and obtaining an object code specifically includes the following steps:
receiving the input code, and analyzing to obtain a corresponding word stream;
recognizing the language category of the word stream according to a preset grammar rule, and performing corresponding grammar check to generate a corresponding grammar tree;
performing semantic analysis on the data in the syntax tree, and performing classification recording;
and generating an object code according to the classified and recorded data.
Further, before receiving the input code, the method further comprises the steps of:
creating a constant pool;
the constant pool is used for storing programming general characters, programming language keywords, general application program interface keywords and runtime environment interface keywords supported by the method by taking the vocabulary entry as a unit;
the constant pool is further used for sequentially storing variables and methods declared in a header file quoted by the input codes, custom variables and custom methods in the input codes and storing the custom variables and the custom methods in the input codes into the constant pool by taking the entries as units when the word stream corresponding to the input codes is extracted;
and when any entry corresponding to the word stream exists in the constant pool in advance, the entry is not stored in the constant pool, and the entry comprises the character string name, the character string attribute and the character string category corresponding to each word in the word stream.
Specifically, the reference package bytecode file includes a binary bytecode file and a binary output mapping file, where the binary output mapping file includes version information, application identification data, and description information of the included method corresponding to the reference package bytecode file.
Specifically, the application package bytecode file includes a method component subfile, a memory component subfile, a runtime method component subfile, and a shared interface component subfile.
Specifically, the method component subfile of the application package bytecode file includes the bytecodes of all methods in the application package, the bytecodes are sequentially arranged according to the declaration order of each method in the source code of the application package, and the storage location and the method name of each method in the application package are respectively recorded in the constant pool in a one-to-one correspondence manner; the memory component subfile records the size and the initial value of a global nonvolatile space and the size value of a global volatile space in the corresponding application package;
the runtime method component subfile comprises an offset value of a runtime environment interface of the corresponding application package, and is used for calling the corresponding application package during installation, deletion, activation and deactivation;
the shared interface component subfile comprises the number of the corresponding shared interfaces declared by the application package and the offset value of each interface method.
Specifically, the generating a download file according to the application package bytecode file and the reference package bytecode file specifically includes the following steps:
and analyzing and obtaining a method component, a memory component, a runtime method component and a shared interface component according to the application package byte code file and the reference package byte code file, and generating a download file according to a preset format by combining a preset data package and application identification data.
In a second aspect, there is provided a software code compiling system, the system comprising:
the software code compiling unit is used for receiving an input code, extracting a word stream corresponding to the input code, generating a syntax tree according to a preset syntax rule, performing semantic analysis, and obtaining an object code, wherein the input code comprises an application package code and a reference package code, the object code comprises an application package object code generated by the application package code and a reference package object code generated by the reference package code, and the application package code and the application package object code both comprise codes corresponding to a runtime environment interface;
the application package generating unit is used for generating an application package byte code file according to the data for realizing the application function in the application package target code;
the reference package generating unit is used for generating a reference package byte code file according to the data for realizing interface calling in the reference package target code;
and the download file generating unit is used for generating a download file according to the application package byte code file and the reference package byte code file.
Specifically, the software code compiling unit is specifically configured to:
receiving the input code, and analyzing to obtain a corresponding word stream;
recognizing the language category of the word stream according to a preset grammar rule, and performing corresponding grammar check to generate a corresponding grammar tree;
performing semantic analysis on the data in the syntax tree, and performing classification recording;
and generating an object code according to the classified and recorded data.
Further, the system is configured with a constant pool;
the constant pool is used for storing programming general characters, programming language keywords, general application program interface keywords and runtime environment interface keywords supported by the system by taking the vocabulary entry as a unit;
the constant pool is further used for sequentially storing variables and methods declared in a header file referred by the input code, custom variables and custom methods in the input code by taking a vocabulary entry as a unit into the constant pool when the software code compiling unit extracts the word stream corresponding to the input code;
and when any entry corresponding to the word stream exists in the constant pool in advance, the entry is not stored in the constant pool, and the entry comprises the character string name, the character string attribute and the character string category corresponding to each word in the word stream.
Specifically, the reference package bytecode file includes a binary bytecode file and a binary output mapping file, where the binary output mapping file includes version information, application identification data, and description information of the included method corresponding to the reference package bytecode file.
Specifically, the application package bytecode file includes a method component subfile, a memory component subfile, a runtime method component subfile, and a shared interface component subfile.
Specifically, the method component subfile of the application package bytecode file includes the bytecodes of all methods in the application package, the bytecodes are sequentially arranged according to the declaration order of each method in the source code of the application package, and the storage location and the method name of each method in the application package are respectively recorded in the constant pool in a one-to-one correspondence manner;
the memory component subfile records the size and the initial value of a global nonvolatile space and the size value of a global volatile space in the corresponding application package;
the runtime method component subfile comprises an offset value of a runtime environment interface of the corresponding application package, and is used for calling the corresponding application package during installation, deletion, activation and deactivation;
the shared interface component subfile comprises the number of the corresponding shared interfaces declared by the application package and the offset value of each interface method.
Specifically, the download file generating unit is specifically configured to parse the application package bytecode file and the reference package bytecode file to obtain a method component, a memory component, a runtime method component, and a shared interface component, and generate the download file according to a preset format by combining a preset data package and application identification data.
The beneficial effect that technical scheme that this application provided brought includes:
the application provides a software code compiling method and system, codes are compiled in advance according to preset grammar rules, a download file convenient for analysis is generated, in embedded development, the requirement for resources is reduced, the performance requirement in embedded development is guaranteed, and the requirement that the download file can be executed in a cross-platform mode is met.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating steps of a software code compiling method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a software code compiling system according to an embodiment of the present application when compiling a code;
FIG. 3 is a block diagram illustrating a flow chart of a software code compiling system when generating a download file according to an embodiment of the present application;
fig. 4 is a schematic block diagram illustrating a virtual machine in a software code compiling system according to an embodiment of the present application during operation;
fig. 5 is a block diagram illustrating a software code compiling system according to a second embodiment of the present application;
reference numerals:
1. a software code compiling unit; 2. an application package generating unit; 3. a reference package generating unit; 4. and a download file generation unit.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
The embodiment of the invention provides a software code compiling method and system, wherein codes are compiled in advance according to a preset grammar rule to generate a download file which is convenient to analyze, the requirement on resources is reduced in embedded development, the performance requirement in the embedded development is guaranteed, and the requirement that the download file can be executed in a cross-platform mode is met.
In order to achieve the technical effects, the general idea of the application is as follows:
a method of software code compilation, the method comprising the steps of:
s1, receiving an input code, extracting a word stream corresponding to the input code, generating a syntax tree according to a preset syntax rule, performing semantic analysis to obtain an object code, wherein the input code comprises an application package code and a reference package code, the object code comprises an application package object code generated by the application package code and a reference package object code generated by the reference package code, and the application package code and the application package object code both comprise codes corresponding to a runtime environment interface;
s2, generating an application package byte code file according to the data for realizing the application function in the application package target code;
s3, generating a reference package byte code file according to the data for realizing interface calling in the reference package target code;
and S4, generating a download file according to the byte code file of the application package and the byte code file of the reference package.
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Example one
Referring to fig. 1 to 4, an embodiment of the present invention provides a software code compiling method, including the following steps:
s1, receiving an input code, extracting a word stream corresponding to the input code, generating a syntax tree according to a preset syntax rule, performing semantic analysis to obtain an object code, wherein the input code comprises an application package code and a reference package code, the object code comprises an application package object code generated by the application package code and a reference package object code generated by the reference package code, and the application package code and the application package object code both comprise codes corresponding to a runtime environment interface;
s2, generating an application package byte code file according to the data for realizing the application function in the application package target code;
s3, generating a reference package byte code file according to the data for realizing interface calling in the reference package target code;
and S4, generating a download file according to the byte code file of the application package and the byte code file of the reference package.
In the embodiment of the application, an input code is received first, and a specific work flow is performed:
1) performing lexical analysis on the input code, i.e. analyzing the input code to obtain a word stream corresponding to the input code,
2) performing syntax analysis on the word stream, namely recognizing a corresponding syntax category from the word stream according to a preset syntax rule, performing syntax check, performing corresponding syntax check, generating a corresponding syntax tree,
3) semantic analysis is carried out on the result of the syntactic analysis to generate corresponding intermediate codes, various statements are recorded into a symbol table, statement types are recorded, expression types are recorded and the like,
4) code generation is carried out according to the result of semantic analysis to finally obtain a target code,
wherein the input code comprises an application package code and a reference package code, the object code comprises an application package object code generated by the application package code and a reference package object code generated by the reference package code, the application package code and the application package object code both comprise a code corresponding to the runtime environment interface,
in practical situation, when performing syntactic analysis, scanning an input code according to a coding sequence, adding an obtained word to a preset constant pool according to a certain rule, wherein each entry in the constant pool contains information such as a character string name, an attribute, a category and the like corresponding to the word,
when the syntax analysis is carried out, the analysis of the global statement level comprises the analysis of global variables, enumerated types, functions and the like,
when semantic analysis is carried out, sentence level analysis is carried out, the syntax and semantics of other codes except statements in a function are analyzed,
the generation process of the target code is to analyze the expression level, analyze various expressions in the program and generate corresponding byte code expressions.
The source file, namely the compiled output of the input code, namely the target code, is an application package byte code file and a reference package byte code file, wherein the application realizing runtime environment interfaces (process, select, deselect, install, uninstantall, getsccllibinterface) generates the corresponding application package byte code file, while the pure method package (no runtime environment interface) and the application with a shared interface generate the reference package byte code file, and each source file generates a byte code file correspondingly.
In the embodiment of the application, codes are compiled in advance according to the preset grammar rule to generate the download file which is convenient to analyze, the requirement on resources is reduced in embedded development, the performance requirement in the embedded development is guaranteed, and the requirement that the download file can be executed in a cross-platform mode is met.
When the input code is to be compiled, it can be specifically subjected to multilevel processing, i.e.
(1) Universal single character (ASCII code);
(2) keywords supported by a code encoding language;
(3) API keywords supported by the embedded module;
(4) applying custom variables and methods;
(5) a common expression;
during specific operation, in the pre-compiling process, the characters in (1) to (3) are added to the constant pool in sequence, when the supported keywords and the API are fixed, the constant pool data of the part is fixed, and then in the code compiling process, the characters in (4) are added to the constant pool in sequence.
The character strings corresponding to each member in the constant pool are unique, and the member structure body is marked with the sequence ID, the complete character string information and the check compression value of the character strings and used for comparing and checking the read character strings during subsequent encoding.
The API keywords can be upgraded, the newly added API keywords are added to the back of the original API keywords in the constant pool during upgrading, the API with the high version can be compatible with the API with the low version according to the upgrading sequence, and downward compatibility of the compiling results before and after upgrading is guaranteed.
It should be noted that the file in the input code and the target code, which implements the runtime environment interface, is an application package, and the embedded module can call the runtime environment interface of the application package to select activation and running of the application package functions, because the firewall security requires that the common methods and variables in the application package can only be accessed in the current package, and the shared interface method of the other party can be accessed between different application packages;
the file of the input code and the object code, which does not realize the runtime environment interface, is a reference package, and the reference package externally provides a mapping so that the method of the reference package can be called by different application packages.
The download file obtained by the embodiment of the application needs to depend on a virtual machine system and a runtime environment system during actual application,
the virtual machine system is used for processing the download file, analyzing the byte codes in the download file and executing the corresponding application package code function. The runtime environment system is used for managing the life cycle of the application, accessing a runtime environment interface of the application and performing firewall management during the operation of the application.
In the runtime environment system, each source file which realizes the runtime environment interface is taken as a package, which is instantiated as an application applet, and the runtime environment interface mainly functions as follows:
activating according to the selection instruction, and deactivating the specified application;
distributing the received instruction to the current application, namely calling an entry function of the application;
and (4) firewall management, which prevents applications under different packages from accessing each other.
The core of the virtual machine system is virtual machine byte codes, the basic principle of the virtual machine system is that the byte codes, a stack and an interpreter act together, the byte codes are responsible for realizing syntax operational characters of a program, the stack is responsible for storing data such as parameters, variables, temporary operational numbers and the like, the interpreter analyzes the byte codes acquired from a program pointer, and the three realize the expression of a programming language together.
When the download file is generated, a download file conversion tool is used to convert the application package byte code file into GP download script,
firstly, a hexadecimal GP file is generated, then, each component data in the characteristic 8 is extracted from the byte code file of the application package, each component is sequentially added into the GP file according to the TLV format of the component identification, the length and the data, and in addition, according to the description of the point 2, the concept of the package and the application is introduced into the runtime environment system, so that a developer can input the package of the current source file and the AID of the application according to the requirement in the download file conversion tool, the AIDs of the package and the application are unique in each embedded module system, and the runtime environment system can find the corresponding application according to the AID.
It should be noted that, an application package code contains a code corresponding to the runtime environment interface, and similarly, an application package object code contains a code corresponding to the runtime environment interface;
the input code comprises at least one application package code and may also comprise one, a plurality of or no reference package code, and similarly, the target code comprises at least one application package target code and may also comprise one, a plurality of or no reference package target code;
one application package code may need to use multiple reference package codes in actual application, and similarly, one application package object code may need to use multiple reference package object codes in actual application.
Specifically, before receiving the input code, the method further comprises the steps of:
creating a constant pool;
the constant pool is used for storing programming general characters, programming language keywords, general application program interface keywords and runtime environment interface keywords supported by the method by taking the vocabulary entry as a unit;
the constant pool is also used for storing variables and methods declared in a header file quoted by the input codes, custom variables and custom methods in the input codes respectively in the unit of entries into the constant pool when extracting word streams corresponding to the input codes;
and when any entry corresponding to the word stream exists in the constant pool in advance, the entry is not stored in the constant pool, and the entry comprises the character string name, the character string attribute and the character string category corresponding to each word in the word stream.
It should be noted that, when software code compilation is performed, a constant pool is created, where the constant pool is a basis of lexical analysis, each ID in the constant pool represents a word in a word stream, and a basic structure of the constant pool is composed of a word identifier, a compression code, a word name, a word length, a word type, a used identifier, and a method offset identifier, where the word identifier represents a position of the word in the constant pool, the compression code represents a compression code of a word string, the word name is an original string description of the word, the word length is a string length of the word, the word type represents a function type of the word, the used identifier represents whether the word is called in a source program, and the method offset identifier represents an offset value of the function in a byte code method component when the word is a function;
the offset value specifically refers to a data storage location.
Specifically, in actual operation, the constant pool is composed of:
1. a programming language universal keyword supported by a compiler;
2. a runtime environment interface of the embedded module application;
3. a common API interface for embedded module applications;
4. sharing method interface input in external reference package;
5. analyzing a new statement word searched when a source file and a header file are analyzed, wherein the new statement word specifically comprises a new macro definition, a header file function statement, a variable statement and the like, and all words in the c language are rules which are firstly declared and then called, so that whether the statement is in a constant pool or not is firstly checked when one statement is searched, if not, the word is added into the constant pool, wherein the word mark is a fixed value and indicates that the constant pool member is a character string;
6. for the constant pool member described in the points 2 and 3, the word identifier is a fixed value, which indicates that the member is a character string;
7. for the constant pool member described in the above point 1, the word identifier is the sequential position in the general keyword enumeration;
8. the general keyword enumeration is arranged according to the sequence of types, programming language keywords and operational characters, and the initial value of the word identification is 128;
9. the types in the 8 th point comprise numbers, functions, system functions, shared functions, global variables, local variables and the like, and the type meaning of each constant pool member is marked;
10. for the declaration of a single character, using the corresponding ASCII code as a word identification value, wherein the range is 0-127, and for the declarations of a plurality of characters, the word identification values are defined according to the descriptions of 1-8;
11. the compression encoding of the constant pool member is the compression encoding of the word string name, the compression encoding of the member with the word identification less than 128 is 0, and the compression encoding of other members is a hash value operation of ASCII codes of all characters of the word;
12. the word name and word length of a constant pool member are the complete string descriptions of its words;
13. the word type of the constant pool member is the type that the word represents, as shown in FIG. 9 above; particularly, when the word is a function for inputting a reference package byte code file, the type of the word is a sharing function;
14. the used identification attribute of the constant pool member indicates whether the word is used by the source file, if not, the word is not considered when being linked finally, so that the link speed can be accelerated, and the use space is optimized;
15. when the method offset identification attribute of the constant pool member indicates that the word is a function method, the offset value, namely the offset position, namely the storage position, of the bytecode corresponding to the function in the bytecode interval is searched by the constant pool when the function is called, and then the corresponding member is jumped by using the method offset value.
Since there are multiple API interfaces, there is a set of API interfaces, inside which the multiple API interfaces are stored sequentially.
In the actual operation process, the constant pool is used for marking keywords supported by the current compiling environment, and variables, macro definitions and function declarations of the source file and the header file, and is used for performing corresponding semantic analysis after reading words when analyzing the source file code.
In addition, the word string corresponding to each member in the constant pool is unique, but because the string composition and length of the word are not controllable, performance and space waste can exist when the string is used simply, so that the embodiment of the application provides a matching method with greatly improved performance and memory overhead, which is specifically divided into 3-level steps, and the operation flow is specifically as follows:
level 1 is word identification comparison, all single character words and programming language keyword words can be searched, and the word identifications of the words are unique;
the 2 nd level is compression coding comparison, and words corresponding to all unique word identifications in the constant pool can be searched out;
level 3 is word name comparison, which can completely match words in the constant pool;
wherein the basic order of matching is 1, 2, 3, and the full string comparison of level 3 is performed only if the word identification is not unique.
In the embodiment of the present application, the specific situation of analyzing the code compiling according to the actual coding sequence is as follows:
1. establishing a constant pool table, and adding programming language keywords, a runtime environment system function, a system common API and the like into the constant pool;
2. reading input source files from top to bottom and from left to right;
3. when the word read from the source file is a header file, searching the header file from a directory where the source file is located, and if the header file does not exist, searching the header file from an installation directory of a compiler; acquiring related words from top to bottom in a header file, searching whether the acquired words are in a constant pool, and if not, adding the words to the constant pool;
4. when the word read from the source file is a function, searching whether the word is in the constant pool, and if the word is not in the constant pool, adding the word to the constant pool;
5. recording line numbers of first line codes in functions in a source file, analyzing all statements in the functions in sequence, generating byte codes corresponding to the function statements according to defined virtual machine byte codes in a virtual machine system, and arranging the byte codes of all the functions according to a stated sequence in the source file to form byte code intervals;
6. recording the offset value of each function in the byte code interval into the method offset identification attribute of the constant pool member corresponding to the word;
7. searching the index of the word in the constant pool when the function call is analyzed, and setting the byte code as the system function call if the word type is the system function; if the function is the shared function, searching a shared function list, and searching a method offset value of the function in the shared packet; and if the method is a common function, directly using the method offset identification parameter in the constant pool as the method offset value.
Specifically, there are 4 types of basic functions in the programming code:
1) the runtime environment interface is used for selecting and switching runtime environments, and other functions cannot call the runtime environment interface;
2) the API interface, namely the general embedded module API interface function, its implement method statement and order are fixed in API interface set, can call while applying;
3) a reference package sharing function, namely an externally self-defined function package, wherein the function package has an AID and a method list of the function package, and a source file can call the sharing function in the package after being referred;
4) the source file is self-defined, and the application can be freely called.
The constant pool word type of the runtime environment interface and the API interface is a system function, and a word identification value corresponding to each function is fixed and unique; the type of the quote package function is a shared function, the word type of the source file self-defined function is a common function, and the word identification values are all character string types;
the API interface is used for inputting a system function calling byte code in the virtual machine system according to the sequence stated in the API interface set, and each function corresponds to one ID;
the steps realize the basic compiling process of the embedded module application, and the output is an application package byte code file.
Specifically, the reference package bytecode file includes a binary bytecode file and a binary output mapping file, and the binary output mapping file includes version information, application identification data, and description information of the included method corresponding to the reference package bytecode file.
Specifically, the application package bytecode file includes a method component subfile, a memory component subfile, a runtime method component subfile, and a shared interface component subfile.
It should be noted that the subfiles herein do not represent the relationship between upper and lower levels, but there are multiple parts in the bytecode file of the application package, which are a method component part, a memory component part, a runtime method component part, and a shared interface component part, and are referred to as subfiles herein for descriptive purposes.
The method component subfile of the application package bytecode file comprises bytecode of all methods in the application package, the bytecode is sequentially arranged according to the declaration sequence of each method in the source code of the application package, and the storage positions and the method names of the methods in the application package are respectively recorded in a constant pool in a one-to-one correspondence manner;
the Memory component subfile records the size and initial value of a global Non-volatile Memory (NVM) and the size value of a Random Access Memory (RAM) in a corresponding application package;
the runtime method component subfile comprises an offset value of a runtime environment interface of the corresponding application package, and is used for calling the corresponding application package during installation, deletion, activation and deactivation;
the shared interfaces component subfile includes the number of shared interfaces declared by the corresponding application package and the offset value for each interface method.
Specifically, the method for generating the download file according to the application package bytecode file and the reference package bytecode file includes the following steps:
and analyzing the obtained method component, the memory component, the runtime method component and the shared interface component according to the application package byte code file and the reference package byte code file, and generating a download file according to a preset format by combining a preset data package and application identification data.
Here, a virtual machine system in actual application will be explained:
the virtual machine system is realized on the embedded module, can download the byte code file corresponding to the virtual machine, and executes the corresponding byte code flow in the card;
the stack, RAM (volatile memory space) and NVM (non-volatile memory space) resources of the virtual machine during operation are uniformly addressed, and the address structure distribution diagram of the virtual machine system defines the resources as follows:
virtual machine stacking: the system comprises an analog register, an operation stack and a program stack;
RAM: RAM space applied in the application;
NVM resource:
static NVM: downloading an application package byte code file to a space occupied in the card, and applying a defined global NVM resource with a given size and other personalized resources;
dynamic NVM: applying the dynamically applied NVM resources in the running process;
different virtual machine system implementations can allocate the proportion of each resource according to actual conditions.
Here, a runtime environment system in actual application will be explained:
the runtime management system is responsible for managing the life cycle of the card and the application, application selection, firewall protection and the like, wherein:
the application life cycle is formed by methods corresponding to 5 runtime environment structures, an install method is responsible for private instantiation during application installation, a select method is responsible for application activation, a process method is an entrance of an application processing command and is responsible for receiving and processing an APDU command, a select method is responsible for application deactivation, an uninstant method is responsible for private de-instantiation operation during application deletion, and each function corresponds to one life cycle stage of the application;
because of the multi-application scenario in the embedded module, the required application must be selected before executing the instructions, the application selection is executed by the logical channel management and select file command, these 2 instructions are used by the runtime environment system to indicate the activated application instance in the session of a logical channel, once an instance is selected, this application instance will receive all subsequent private commands distributed to that logical channel until this application instance becomes non-selected.
The protection provided by the firewall of the runtime environment system avoids the most frequent foreseeable potential safety hazards: resulting in errors and design omissions where sensitive data is revealed to developers of other applications. An application can gain access to other source files from an interface that is publicly accessible. Firewalls also provide protection against incorrect code. If incorrect code is loaded onto the card, the firewall can still protect the existing data from being accessed by this malicious code.
On the basis of the firewall, the runtime environment system also provides a mechanism for allowing different applications to interact, namely a shared interface mechanism, wherein a shared interface defines a set of all interface methods that can be shared in the application, and the methods can be called in different context (package and application) environments.
Here, a download file conversion tool in actual use will be explained:
the input of the download file conversion tool comprises a package AID of a source file and an input application package byte code file path;
the output of the download file conversion tool comprises a download script file with a fixed format;
the basic principle is that data of a method component, a memory component, a runtime method component and a shared interface method component in an application package byte code file are extracted, and the extracted data and an input package AID are organized into a download file with a fixed format.
Based on the same inventive concept, the application provides an embodiment of a system corresponding to the embodiment, which is detailed in the second embodiment
Example two
Referring to fig. 5, an embodiment of the present invention provides a software code compiling system, including:
the software code compiling unit 1 is used for receiving an input code, extracting a word stream corresponding to the input code, generating a syntax tree according to a preset syntax rule, performing semantic analysis, and obtaining an object code, wherein the input code comprises an application package code and a reference package code, the object code comprises an application package object code generated by the application package code and a reference package object code generated by the reference package code, and the application package code and the application package object code both comprise codes corresponding to a runtime environment interface;
an application package generating unit 2 for generating an application package bytecode file according to data for realizing an application function in an application package target code;
a reference package generating unit 3, configured to generate a reference package bytecode file according to data for implementing interface calling in a reference package target code;
and a download file generating unit 4 for generating a download file from the application package bytecode file and the reference package bytecode file.
In the embodiment of the present application, firstly, the software code compiling unit 1 receives an input code, and performs a specific workflow:
1) performing lexical analysis on the input code, i.e. analyzing the input code to obtain a word stream corresponding to the input code,
2) performing syntax analysis on the word stream, namely recognizing a corresponding syntax category from the word stream according to a preset syntax rule, performing syntax check, performing corresponding syntax check, generating a corresponding syntax tree,
3) semantic analysis is carried out on the result of the syntactic analysis to generate corresponding intermediate codes, various statements are recorded into a symbol table, statement types are recorded, expression types are recorded and the like,
4) code generation is carried out according to the result of semantic analysis to finally obtain a target code,
wherein the input code comprises an application package code and a reference package code, the object code comprises an application package object code generated by the application package code and a reference package object code generated by the reference package code, the application package code and the application package object code both comprise a code corresponding to the runtime environment interface,
in practical situation, when performing syntactic analysis, scanning an input code according to a coding sequence, adding an obtained word to a preset constant pool according to a certain rule, wherein each entry in the constant pool contains information such as a character string name, an attribute, a category and the like corresponding to the word,
when the syntax analysis is carried out, the analysis of the global statement level comprises the analysis of global variables, enumerated types, functions and the like,
when semantic analysis is carried out, sentence level analysis is carried out, the syntax and semantics of other codes except statements in a function are analyzed,
the generation process of the target code is to analyze the expression level, analyze various expressions in the program and generate corresponding byte code expressions.
The source file, i.e. the compiled output of the input code, i.e. the target code, is an application package bytecode file and a reference package bytecode file, wherein an application implementing a runtime environment interface (process, select, deselect, install, uninstantall, getsccllibinterface) generates a corresponding application package bytecode file, while a reference package (no runtime environment interface) and an application having a shared interface generate a reference package bytecode file, and each source file generates a binary bytecode file (an application package bytecode file or a reference package bytecode file) correspondingly.
In the embodiment of the application, codes are compiled in advance according to the preset grammar rule to generate the download file which is convenient to analyze, the requirement on resources is reduced in embedded development, the performance requirement in the embedded development is guaranteed, and the requirement that the download file can be executed in a cross-platform mode is met.
When the input code is to be compiled, it can be specifically subjected to multilevel processing, i.e.
(1) Universal single character (ASCII code);
(2) keywords supported by a code encoding language;
(3) API (Application Programming Interface) keywords supported by the embedded module;
(4) applying custom variables and methods;
(5) a common expression;
during specific operation, in the pre-compiling process, the characters in (1) to (3) are added to the constant pool in sequence, when the supported keywords and the API are fixed, the constant pool data of the part is fixed, and then in the code compiling process, the characters in (4) are added to the constant pool in sequence.
The character strings corresponding to each member in the constant pool are unique, and the member structure body is marked with the sequence ID, the complete character string information and the check compression value of the character strings and used for comparing and checking the read character strings during subsequent encoding.
The API keywords can be upgraded, the newly added API keywords are added to the back of the original API keywords in the constant pool during upgrading, the API with the high version can be compatible with the API with the low version according to the upgrading sequence, and downward compatibility of the compiling results before and after upgrading is guaranteed.
It should be noted that the file in the input code and the target code, which implements the runtime environment interface, is an application package, and the embedded module can call the runtime environment interface of the application package to select activation and running of the application package functions, because the firewall security requires that the common methods and variables in the application package can only be accessed in the current package, and the shared interface method of the other party can be accessed between different application packages;
the file of the input code and the object code, which does not realize the runtime environment interface, is a reference package, and the reference package externally provides a mapping so that the method of the reference package can be called by different application packages.
The download file obtained by the embodiment of the application needs to depend on a virtual machine system and a runtime environment system during actual application,
the virtual machine system is used for processing the download file, analyzing the byte codes in the download file and executing the corresponding application package code function. The runtime environment system is used for managing the life cycle of the application, accessing a runtime environment interface of the application and performing firewall management during the operation of the application.
In the runtime environment system, each source file which realizes the runtime environment interface is taken as a package, which is instantiated as an application applet, and the runtime environment system mainly functions as follows:
activating according to the selection instruction, and deactivating the specified application;
distributing the received instruction to the current application, namely calling an entry function of the application;
and (4) firewall management, which prevents applications under different packages from accessing each other.
The core of the virtual machine system is virtual machine byte codes, the basic principle of the virtual machine system is that the byte codes, a stack and an interpreter act together, the byte codes are responsible for realizing syntax operational characters of a program, the stack is responsible for storing data such as parameters, variables, temporary operational numbers and the like, the interpreter analyzes the byte codes acquired from a program pointer, and the three realize the expression of a programming language together.
When the download file is generated, a download file conversion tool is specifically used, and the function of the download file conversion tool is to convert the application package bytecode file and the reference package bytecode file into a standard GP (GP, global platform international standard organization) download script.
It should be noted that, an application package code contains a code corresponding to the runtime environment interface, and similarly, an application package object code contains a code corresponding to the runtime environment interface;
the input code comprises at least one application package code and may also comprise one, a plurality of or no reference package code, and similarly, the target code comprises at least one application package target code and may also comprise one, a plurality of or no reference package target code;
one application package code may need to use multiple reference package codes in actual application, and similarly, one application package object code may need to use multiple reference package object codes in actual application.
Specifically, the system is configured with a constant pool;
the constant pool is used for storing programming general characters, programming language keywords, general application program interface keywords and runtime environment interface keywords supported by the system by taking the vocabulary entry as a unit;
the constant pool is also used for storing variables and methods declared in a header file quoted by the input codes, custom variables and custom methods in the input codes respectively in the unit of entries when the software code compiling unit extracts word streams corresponding to the input codes;
and when any entry corresponding to the word stream exists in the constant pool in advance, the entry is not stored in the constant pool, and the entry comprises the character string name, the character string attribute and the character string category corresponding to each word in the word stream.
It should be noted that, when software code compilation is performed, a constant pool is created, where the constant pool is a basis of lexical analysis, each ID in the constant pool represents a word in a word stream, and a basic structure of the constant pool is composed of a word identifier, a compression code, a word name, a word length, a word type, a used identifier, and a method offset identifier, where the word identifier represents a position of the word in the constant pool, the compression code represents a compression code of a word string, the word name is an original string description of the word, the word length is a string length of the word, the word type represents a function type of the word, the used identifier represents whether the word is called in a source program, and the method offset identifier represents an offset value of the function in a byte code method component when the word is a function;
the offset value specifically refers to a data storage location.
In the actual operation process, the constant pool is used for marking keywords supported by the current compiling environment, and variables, macro definitions and function declarations of the source file and the header file, and is used for performing corresponding semantic analysis after reading words when analyzing the source file code.
In addition, the word string corresponding to each member in the constant pool is unique, but because the string composition and length of the word are not controllable, performance and space waste can exist when the string is used simply, so that the embodiment of the application provides a matching method with greatly improved performance and memory overhead, which is specifically divided into 3-level steps, and the operation flow is specifically as follows:
level 1 is word identification comparison, all single character words and programming language keyword words can be searched, and the word identifications of the words are unique;
the 2 nd level is compression coding comparison, and words corresponding to all unique word identifications in the constant pool can be searched out;
level 3 is word name comparison, which can completely match words in the constant pool;
wherein the basic order of matching is 1, 2, 3, and the full string comparison of level 3 is performed only if the word identification is not unique.
Specifically, the reference package bytecode file includes a binary bytecode file and a binary output mapping file, and the binary output mapping file includes version information, application identification data, and description information of the included method corresponding to the reference package bytecode file.
Specifically, the application package bytecode file includes a method component subfile, a memory component subfile, a runtime method component subfile, and a shared interface component subfile.
It should be noted that the subfiles herein do not represent the relationship between upper and lower levels, but there are multiple parts in the bytecode file of the application package, which are a method component part, a memory component part, a runtime method component part, and a shared interface component part, and are referred to as subfiles herein for descriptive purposes.
The method component subfile of the application package bytecode file comprises bytecode of all methods in the application package, the bytecode is sequentially arranged according to the declaration sequence of each method in the source code of the application package, and the storage positions and the method names of the methods in the application package are respectively recorded in a constant pool in a one-to-one correspondence manner;
the Memory component subfile records the size and initial value of a global Non-volatile Memory (NVM) and the size value of a Random Access Memory (RAM) in a corresponding application package;
the runtime method component subfile comprises an offset value of a runtime environment interface of the corresponding application package, and is used for calling the corresponding application package during installation, deletion, activation and deactivation;
the shared interfaces component subfile includes the number of shared interfaces declared by the corresponding application package and the offset value for each interface method.
Specifically, the download file generating unit 4 is specifically configured to parse the application package bytecode file and the reference package bytecode file to obtain a method component, a memory component, a runtime method component, and a shared interface component, and generate the download file according to a preset format by combining a preset data package and application identification data.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (14)

1. A method for compiling software code, the method comprising the steps of:
receiving an input code, extracting a word stream corresponding to the input code, generating a syntax tree according to a preset syntax rule, performing semantic analysis, and obtaining an object code, wherein the input code comprises an application package code and a reference package code, the object code comprises an application package object code generated by the application package code and a reference package object code generated by the reference package code, and the application package code and the application package object code both comprise codes corresponding to runtime environment interfaces;
generating an application package byte code file according to the data for realizing the application function in the application package target code;
generating a reference package byte code file according to data for realizing interface calling in the reference package target code;
and generating a download file according to the application package byte code file and the reference package byte code file.
2. The software code compiling method according to claim 1, wherein the receiving of the input code, the extracting of the word stream corresponding to the input code, the generating of the syntax tree according to the preset syntax rules, and the semantic analysis to obtain the object code, specifically comprises the following steps:
receiving the input code, and analyzing to obtain a corresponding word stream;
recognizing the language category of the word stream according to a preset grammar rule, and performing corresponding grammar check to generate a corresponding grammar tree;
performing semantic analysis on the data in the syntax tree, and performing classification recording;
and generating an object code according to the classified and recorded data.
3. A method of software code compilation according to claim 1, characterized in that, before receiving the input code, the method further comprises the steps of:
creating a constant pool;
the constant pool is used for storing programming general characters, programming language keywords, general application program interface keywords and runtime environment interface keywords supported by the method by taking the vocabulary entry as a unit;
the constant pool is further used for sequentially storing variables and methods declared in a header file quoted by the input codes, custom variables and custom methods in the input codes and storing the custom variables and the custom methods in the input codes into the constant pool by taking the entries as units when the word stream corresponding to the input codes is extracted;
and when any entry corresponding to the word stream exists in the constant pool in advance, the entry is not stored in the constant pool, and the entry comprises the character string name, the character string attribute and the character string category corresponding to each word in the word stream.
4. The software code compiling method according to claim 1, wherein:
the reference package bytecode file includes a binary bytecode file and a binary output mapping file, and the binary output mapping file includes version information, application identification data, and description information of the included method corresponding to the reference package bytecode file.
5. A method of software code compilation according to claim 3, characterized in that:
the application package bytecode file comprises a method component subfile, a memory component subfile, a runtime method component subfile and a shared interface component subfile.
6. The software code compiling method according to claim 5, wherein:
the method component subfile of the application package bytecode file comprises the bytecode of all methods in the application package, the bytecode is sequentially arranged according to the declaration sequence of each method in the source code of the application package, and the storage position and the method name of each method in the application package are respectively and correspondingly recorded in the constant pool; the memory component subfile records the size and the initial value of a global nonvolatile space and the size value of a global volatile space in the corresponding application package;
the runtime method component subfile comprises an offset value of a runtime environment interface of the corresponding application package, and is used for calling the corresponding application package during installation, deletion, activation and deactivation;
the shared interface component subfile comprises the number of the corresponding shared interfaces declared by the application package and the offset value of each interface method.
7. The method for compiling software codes according to claim 1, wherein the step of generating a download file according to the application package bytecode file and the reference package bytecode file comprises the steps of:
and analyzing and obtaining a method component, a memory component, a runtime method component and a shared interface component according to the application package byte code file and the reference package byte code file, and generating a download file according to a preset format by combining a preset data package and application identification data.
8. A software code compilation system, the system comprising:
the software code compiling unit is used for receiving an input code, extracting a word stream corresponding to the input code, generating a syntax tree according to a preset syntax rule, performing semantic analysis, and obtaining an object code, wherein the input code comprises an application package code and a reference package code, the object code comprises an application package object code generated by the application package code and a reference package object code generated by the reference package code, and the application package code and the application package object code both comprise codes corresponding to a runtime environment interface;
the application package generating unit is used for generating an application package byte code file according to the data for realizing the application function in the application package target code;
the reference package generating unit is used for generating a reference package byte code file according to the data for realizing interface calling in the reference package target code;
and the download file generating unit is used for generating a download file according to the application package byte code file and the reference package byte code file.
9. The software code compilation system of claim 8, wherein the software code compilation unit is specifically configured to:
receiving the input code, and analyzing to obtain a corresponding word stream;
recognizing the language category of the word stream according to a preset grammar rule, and performing corresponding grammar check to generate a corresponding grammar tree;
performing semantic analysis on the data in the syntax tree, and performing classification recording;
and generating an object code according to the classified and recorded data.
10. The software code compilation system of claim 8, wherein:
the system is configured with a constant pool;
the constant pool is used for storing programming general characters, programming language keywords, general application program interface keywords and runtime environment interface keywords supported by the system by taking the vocabulary entry as a unit;
the constant pool is further used for sequentially storing variables and methods declared in a header file referred by the input code, custom variables and custom methods in the input code by taking a vocabulary entry as a unit into the constant pool when the software code compiling unit extracts the word stream corresponding to the input code;
and when any entry corresponding to the word stream exists in the constant pool in advance, the entry is not stored in the constant pool, and the entry comprises the character string name, the character string attribute and the character string category corresponding to each word in the word stream.
11. The software code compilation system of claim 8, wherein:
the reference package bytecode file includes a binary bytecode file and a binary output mapping file, and the binary output mapping file includes version information, application identification data, and description information of the included method corresponding to the reference package bytecode file.
12. The software code compilation system of claim 10, wherein:
the application package bytecode file comprises a method component subfile, a memory component subfile, a runtime method component subfile and a shared interface component subfile.
13. The software code compilation system of claim 12, wherein:
the method component subfile of the application package bytecode file comprises the bytecode of all methods in the application package, the bytecode is sequentially arranged according to the declaration sequence of each method in the source code of the application package, and the storage position and the method name of each method in the application package are respectively and correspondingly recorded in the constant pool;
the memory component subfile records the size and the initial value of a global nonvolatile storage space and the size value of the global volatile storage space in the corresponding application package;
the runtime method component subfile comprises an offset value of a runtime environment interface of the corresponding application package, and is used for calling the corresponding application package during installation, deletion, activation and deactivation;
the shared interface component subfile comprises the number of the corresponding shared interfaces declared by the application package and the offset value of each interface method.
14. The software code compilation system of claim 12, wherein:
the download file generation unit is specifically configured to parse the application package bytecode file and the reference package bytecode file to obtain a method component, a memory component, a runtime method component, and a shared interface component, and generate a download file according to a preset format by combining a preset data package and application identification data.
CN202010815520.3A 2020-08-12 2020-08-12 Software code compiling method and system Active CN112052006B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010815520.3A CN112052006B (en) 2020-08-12 2020-08-12 Software code compiling method and system
PCT/CN2021/104177 WO2022033229A1 (en) 2020-08-12 2021-07-02 Software code compiling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010815520.3A CN112052006B (en) 2020-08-12 2020-08-12 Software code compiling method and system

Publications (2)

Publication Number Publication Date
CN112052006A true CN112052006A (en) 2020-12-08
CN112052006B CN112052006B (en) 2021-06-15

Family

ID=73601687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010815520.3A Active CN112052006B (en) 2020-08-12 2020-08-12 Software code compiling method and system

Country Status (2)

Country Link
CN (1) CN112052006B (en)
WO (1) WO2022033229A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568620A (en) * 2021-06-16 2021-10-29 杭州华橙软件技术有限公司 Code file processing method, device, equipment and medium
CN113703779A (en) * 2021-09-06 2021-11-26 武汉市字节码科技有限公司 Cross-platform multi-language compiling method and ultra-light Internet of things virtual machine
WO2022033229A1 (en) * 2020-08-12 2022-02-17 武汉天喻信息产业股份有限公司 Software code compiling method and system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115826991B (en) * 2023-02-14 2023-05-09 江西曼荼罗软件有限公司 Software script generation method, system, computer and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581084A (en) * 2004-05-20 2005-02-16 北京大学 Binary system software member and its manufacturing method
CN1790268A (en) * 2004-12-14 2006-06-21 艾克斯麦提克方案私人有限公司 Compile time linking via hashing technique
CN1790267A (en) * 2005-12-14 2006-06-21 浙江大学 Virtual machine compiling system implementation method applied in Java operation system
CN101408849A (en) * 2008-12-01 2009-04-15 中国科学技术大学 Method and system for compiling and executing TTCN-3 language
CN102880452A (en) * 2012-02-01 2013-01-16 日照市国软软件有限公司 Programming language capable of cross-language reusing
CN103123590A (en) * 2011-11-18 2013-05-29 中国科学院沈阳计算技术研究所有限公司 Compiling method from intermediate language (IL) program to C language program of instruction list
CN104182267A (en) * 2013-05-21 2014-12-03 中兴通讯股份有限公司 Compiling method, interpreting method, interpreting device and user equipment
CN104239115A (en) * 2014-07-24 2014-12-24 汕头大学 Programming language compiling method of PLC (Programmable Logic Controller)
CN110162306A (en) * 2018-02-14 2019-08-23 阿里巴巴集团控股有限公司 The just-ahead-of-time compilation method and apparatus of system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8181167B2 (en) * 2008-01-09 2012-05-15 Kan Zhao Method and system for presenting and analyzing software source code through intermediate representation
CN111240982A (en) * 2020-01-09 2020-06-05 华东师范大学 Static analysis method for source code
CN111381817A (en) * 2020-03-25 2020-07-07 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for realizing cross-platform multi-language development
CN112052006B (en) * 2020-08-12 2021-06-15 武汉天喻信息产业股份有限公司 Software code compiling method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581084A (en) * 2004-05-20 2005-02-16 北京大学 Binary system software member and its manufacturing method
CN1790268A (en) * 2004-12-14 2006-06-21 艾克斯麦提克方案私人有限公司 Compile time linking via hashing technique
CN1790267A (en) * 2005-12-14 2006-06-21 浙江大学 Virtual machine compiling system implementation method applied in Java operation system
CN101408849A (en) * 2008-12-01 2009-04-15 中国科学技术大学 Method and system for compiling and executing TTCN-3 language
CN103123590A (en) * 2011-11-18 2013-05-29 中国科学院沈阳计算技术研究所有限公司 Compiling method from intermediate language (IL) program to C language program of instruction list
CN102880452A (en) * 2012-02-01 2013-01-16 日照市国软软件有限公司 Programming language capable of cross-language reusing
CN104182267A (en) * 2013-05-21 2014-12-03 中兴通讯股份有限公司 Compiling method, interpreting method, interpreting device and user equipment
CN104239115A (en) * 2014-07-24 2014-12-24 汕头大学 Programming language compiling method of PLC (Programmable Logic Controller)
CN110162306A (en) * 2018-02-14 2019-08-23 阿里巴巴集团控股有限公司 The just-ahead-of-time compilation method and apparatus of system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022033229A1 (en) * 2020-08-12 2022-02-17 武汉天喻信息产业股份有限公司 Software code compiling method and system
CN113568620A (en) * 2021-06-16 2021-10-29 杭州华橙软件技术有限公司 Code file processing method, device, equipment and medium
CN113568620B (en) * 2021-06-16 2023-08-22 杭州华橙软件技术有限公司 Code file processing method, device, equipment and medium
CN113703779A (en) * 2021-09-06 2021-11-26 武汉市字节码科技有限公司 Cross-platform multi-language compiling method and ultra-light Internet of things virtual machine
CN113703779B (en) * 2021-09-06 2024-04-16 王喆 Cross-platform multi-language compiling method and ultra-light Internet of things virtual machine

Also Published As

Publication number Publication date
WO2022033229A1 (en) 2022-02-17
CN112052006B (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN112052006B (en) Software code compiling method and system
CN111770113B (en) Method for executing intelligent contract, block chain node and node equipment
JP3689368B2 (en) Method of loading an application into a multi-application embedded system with data processing resources, corresponding system and execution method
CN106462425B (en) Method and system for using complex constants
US8863079B2 (en) Efficient and expansive conversions between reference and primitive
CN107526625B (en) Java intelligent contract security detection method based on bytecode inspection
CN107924326B (en) Overriding migration methods of updated types
US6823504B1 (en) Method and apparatus for interfacing a javascript interpreter with library of host objects implemented in java
US8850414B2 (en) Direct access of language metadata
US8141035B2 (en) Method for accessing internal states of objects in object oriented programming
US20040268301A1 (en) Adding new compiler methods to an integrated development environment
US6951014B1 (en) Method and apparatus for representation of a JavaScript program for execution by a JavaScript interpreter
US6898786B1 (en) Javascript interpreter engine written in Java
KR20080021071A (en) Translating expressions in a computing environment
CN113703779B (en) Cross-platform multi-language compiling method and ultra-light Internet of things virtual machine
US8601448B2 (en) Representing pointers and boxing in environments using only reference types
JP4864287B2 (en) Identification method, recording medium, and computer system
CN113760360A (en) File generation method, device, equipment and storage medium
US6961933B2 (en) Representation of Java data types in virtual machines
CN111666095A (en) Method, system, equipment and storage medium for realizing Java decompilation
CN115269058B (en) WPF resource loading method and device
CN114327482A (en) Application format conversion method, device, equipment and storage medium
US20020198698A1 (en) Representation of objects in a Java programming environment
CN114253523A (en) Method and device for reading bare device, computer device and medium
Flimmel Pascal with Truffle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant