CN114610390A - Dynamic extension method and system of CIL (common information language) instruction - Google Patents

Dynamic extension method and system of CIL (common information language) instruction Download PDF

Info

Publication number
CN114610390A
CN114610390A CN202210245936.5A CN202210245936A CN114610390A CN 114610390 A CN114610390 A CN 114610390A CN 202210245936 A CN202210245936 A CN 202210245936A CN 114610390 A CN114610390 A CN 114610390A
Authority
CN
China
Prior art keywords
instruction
new
instructions
execution
cil
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.)
Pending
Application number
CN202210245936.5A
Other languages
Chinese (zh)
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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology 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 Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202210245936.5A priority Critical patent/CN114610390A/en
Publication of CN114610390A publication Critical patent/CN114610390A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30181Instruction operation extension or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention discloses a dynamic expansion method and a dynamic expansion system for a CIL instruction, belongs to the technical field of command line processing, and aims to solve the technical problem of how to realize the dynamic expansion of the CIL instruction. The method comprises the following steps: configuring an instruction set, wherein the instruction set stores a plurality of basic instructions and instruction information newly added by a user; inputting a new instruction by a user, wherein the new instruction is a self-defined combined instruction based on an existing instruction; on the basis of the instruction set, carrying out syntax analysis on the new instruction, decomposing the new instruction into a plurality of existing basic instructions, and integrating required instruction information from the instruction set; carrying out validity check on the basic instruction obtained by decomposition based on the instruction set; executing the decomposed basic instructions one by one, and writing related instruction information in the executing process into a temporary storage file; and for the new instruction which is successfully executed, checking whether the new instruction exists in the instruction set, if not, naming the new instruction and storing the new instruction in the instruction set.

Description

Dynamic extension method and system of CIL (common information language) instruction
Technical Field
The invention relates to the technical field of command line processing, in particular to a dynamic extension method and a dynamic extension system for CIL (common information language) instructions.
Background
The command line interface saves resources of the computer system over the graphical user interface. Under the premise of remembering commands, the operation speed of using a command line interface is usually faster than that of using a graphical user interface. The current CLI commands are stored in the application by means of static commands, which need to be re-entered each time a command combination is used. The current console operating instruction, the instruction set, is fixed, and cannot be modified or expanded by a user, and only can be passively accepted and used. However, in the using process, different instructions can be associated due to the requirement of the service, the existing static instructions cannot build up the relation between the instructions, and the processing of the service becomes passive and cumbersome.
How to realize the dynamic expansion of the CIL instruction is a technical problem to be solved.
Disclosure of Invention
The technical task of the invention is to provide a dynamic expansion method and a system of a CIL instruction aiming at the defects, so as to solve the technical problem of how to realize the dynamic expansion of the CIL instruction.
In a first aspect, the method for dynamically expanding a CIL instruction of the present invention provides an expandable combined instruction on the basis of an existing instruction by adding a temporary storage and a syntax analysis, and the method includes the following steps:
configuring an instruction set, wherein the instruction set stores a plurality of basic instructions and instruction information newly added by a user;
inputting a new instruction by a user, wherein the new instruction is a self-defined combined instruction based on an existing instruction;
for an input new instruction, performing syntax analysis on the new instruction on the basis of the instruction set, decomposing the new instruction into a plurality of existing basic instructions, and integrating required instruction information from the instruction set;
checking the validity of the basic instructions obtained by decomposition based on the instruction set, wherein if the basic instructions obtained by decomposition can be searched in the instruction set, the new instruction is valid, and the instruction decomposition is successful;
executing the new instruction, executing the decomposed basic instructions one by one, and writing related instruction information in the executing process into a temporary storage file so as to facilitate the use of the next instruction;
and for the new instruction which is successfully executed, checking whether the new instruction exists in the instruction set, and if not, naming the new instruction and storing the new instruction in the instruction set.
Preferably, the instruction set stores a plurality of basic instructions and instruction information added by a user in the form of a yaml file;
the instruction information comprises an instruction alias, an instruction specific implementation instruction and parameters required by the instruction, wherein the parameters required by the instruction comprise parameters required by instruction execution and parameters generated after the instruction is executed;
and executing the basic instructions obtained by decomposition one by one, reading parameters required by instruction execution from the temporary storage file, and writing the parameters generated after the instruction generated in the execution process is executed into the temporary storage file.
Preferably, before parsing the new command, it is determined whether the new command exists in a command set, and if not, the new command is parsed.
Preferably, the new instruction is a combined instruction obtained by combining two basic instructions existing in a plurality of instruction sets, and is identified by a special mark symbol;
and running of each instruction in the new instruction has a precedence relationship, and the precedence relationship of the running of the instructions is an instruction level.
Preferably, parsing the new instruction based on the instruction set includes the following steps:
a split-combine instruction, the split-combine instruction being after the new instruction is decomposed into a plurality of existing base instructions based on special tag symbols;
integrating the instruction hierarchy, wherein the integrated instruction hierarchy stores the basic instructions obtained by decomposition in a binary tree form and executes the basic instructions obtained by decomposition in sequence based on the integrated instruction hierarchy;
and instruction parameter verification, wherein the instruction parameter verification is performed by the following method:
the combination of the basic instructions needs to satisfy the following condition: the generation parameter of the first execution instruction is contained in the required parameter of the second execution instruction;
if the new instruction is not satisfied, the new instruction cannot be combined, the check is not passed, and otherwise, the check is passed and the execution can be carried out.
In a second aspect, a dynamic extension system for a CIL instruction of the present invention dynamically extends a CIL by executing the dynamic extension method for a CIL instruction as described in any one of the first aspects, and the system includes:
the configuration module is used for configuring an instruction set, and the instruction set stores a plurality of basic instructions and instruction information newly added by a user;
the new instruction input module is used for inputting a new instruction, and the new instruction is a combined instruction defined by the existing instruction;
the instruction analysis module is used for judging whether the new instruction exists in an instruction set or not for the input new instruction, if not, the new instruction is subjected to syntax analysis on the basis of the instruction set, the new instruction is decomposed into a plurality of existing basic instructions, and required instruction information is integrated from the instruction set;
the instruction checking module is used for checking the effectiveness of the basic instructions obtained by decomposition based on the instruction set, and if the basic instructions obtained by decomposition can be searched in the instruction set, the new instructions are effective and the instruction decomposition is successful;
the instruction execution module is used for executing the new instructions, executing the decomposed basic instructions one by one, and writing related instruction information in the execution process into a temporary storage file so as to facilitate the use of the next instruction;
and the new instruction storage module is used for checking whether the new instruction exists in the instruction set or not for the new instruction which is successfully executed, and naming the new instruction and storing the new instruction in the instruction set if the new instruction does not exist.
Preferably, the instruction set stores a plurality of basic instructions and instruction information added by a user in the form of a yaml file;
the instruction information comprises an instruction alias, an instruction specific implementation instruction and an instruction required parameter, wherein the instruction required parameter comprises an instruction execution required parameter and a parameter generated after the instruction is executed;
and for the basic instructions obtained by decomposition, the instruction execution module is used for executing the instructions one by one, reading parameters required by instruction execution from the temporary storage file, and writing the parameters generated after the instructions generated in the execution process are executed into the temporary storage file.
Preferably, before parsing the new instruction, the instruction parsing module is configured to determine whether the new instruction exists in an instruction set, and if not, parse the new instruction.
Preferably, the new instruction is a combined instruction obtained by combining two basic instructions existing in a plurality of instruction sets, and is identified by a special mark symbol;
and running of each instruction in the new instruction has a precedence relationship, and the precedence relationship of the running of the instructions is an instruction level.
Preferably, the execution parsing module is configured to parse the new instruction according to the instruction set by:
a split-combine instruction, the split-combine instruction being after the new instruction is decomposed into a plurality of existing base instructions based on special tokens;
integrating the instruction hierarchy, wherein the integrated instruction hierarchy stores the basic instructions obtained by decomposition in a binary tree form and executes the basic instructions obtained by decomposition in sequence based on the integrated instruction hierarchy;
and instruction parameter verification, wherein the instruction parameter verification is performed by the following method:
the combination of the basic instructions needs to satisfy the following condition: the generation parameter of the first execution instruction is contained in the required parameter of the second execution instruction;
if the new instruction is not satisfied, the new instruction cannot be combined, the check is not passed, and otherwise, the check is passed and the execution can be carried out.
The dynamic expansion method and the system of the CIL instruction have the following advantages that: the relation between independent instructions is built by selectively storing the execution result of the instructions in a temporary storage mode, and a user can expand a CLI instruction set according to own services for the dynamic combination of the existing CLI instructions, so that the freedom of the CLI instructions is improved, and the service processing efficiency of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
The invention is further described below with reference to the accompanying drawings.
FIG. 1 is a schematic block diagram of a dynamic expansion method of a CIL instruction according to embodiment 1;
FIG. 2 is a block diagram illustrating a flow chart of a new instruction in the dynamic expansion method of CIL instruction of embodiment 1;
FIG. 3 is a diagram illustrating the data format and combination of instruction sets in the dynamic expansion method of CIL instruction in embodiment 1;
FIG. 4 is a block diagram illustrating a new instruction parsing flow in the dynamic extension method of CIL instruction according to embodiment 1.
Detailed Description
The present invention is further described in the following with reference to the drawings and the specific embodiments so that those skilled in the art can better understand the present invention and can implement the present invention, but the embodiments are not to be construed as limiting the present invention, and the embodiments and the technical features of the embodiments can be combined with each other without conflict.
The embodiment of the invention provides a dynamic expansion method and a dynamic expansion system for CIL instructions, which are used for solving the technical problem of how to realize the dynamic expansion of the CIL instructions.
Example 1:
the invention relates to a dynamic expansion method of CIL instruction, which provides an expandable combined instruction on the basis of the existing instruction by adding a temporary storage and a syntax analysis mode, and comprises the following steps:
s100, configuring an instruction set, wherein the instruction set stores a plurality of basic instructions and instruction information newly added by a user;
s200, inputting a new instruction by a user, wherein the new instruction is a self-defined combined instruction based on an existing instruction;
s300, for the input new instruction, carrying out grammar analysis on the new instruction on the basis of the instruction set, decomposing the new instruction into a plurality of existing basic instructions and integrating required instruction information from the instruction set;
s400, validity verification is carried out on the basic instructions obtained through decomposition based on the instruction set, if the basic instructions obtained through decomposition can be searched in the instruction set, the new instructions are valid, and the instruction decomposition is successful;
s500, executing the new instruction, executing the decomposed basic instructions one by one, and writing related instruction information in the executing process into a temporary storage file so as to facilitate the use of the next instruction;
s600, for the new instruction which is successfully executed, checking whether the new instruction exists in the instruction set, and if the new instruction does not exist in the instruction set, naming the new instruction and storing the new instruction in the instruction set.
In this embodiment, the instruction set stores the own basic instructions and the instruction information added by the user in the form of a yaml file. The instruction information comprises an instruction alias, an instruction specific implementation instruction and instruction required parameters, wherein the instruction required parameters comprise instruction execution required parameters and instruction execution post-generation parameters. The 'instruction alias' is input for the instruction which is short for facilitating subsequent combination operation, the 'instruction concrete implementation' is the instruction corresponding to actual execution in the instruction execution process, the 'parameter required by the instruction' is data required to be actively provided by a user in the instruction execution process, and the 'parameter generated after the instruction execution' is used for matching the generated result of the instruction to the corresponding parameter and waiting for calling of other instructions.
Each instruction is stored in an instruction set, which contains 4 basic attributes, namely, the alias of the instruction, the specific implementation of the instruction, the parameters required by the instruction, and the parameters generated after the instruction is executed.
The combination of the instructions is obtained by converting and integrating the existing instructions in the instruction set, and whether the two instructions can be combined to generate a new instruction or not requires that the generation parameters of the instruction to be executed first are contained in the parameters required by the instruction to be executed later.
In step S200, the new command is a self-defined combination command based on the existing command. Each new instruction corresponds to a combined instruction set, and the combined instructions are represented by combining with special signs, such as "{ }" used in fig. 3, and the combination is also limited by using fixed signs. Each new combined instruction is obtained by combining every two instructions in a plurality of instruction sets, and the running of each instruction has a precedence relationship which is embodied as the instruction hierarchy.
Step S300 parses the new instruction. Compared with the traditional instruction analysis, the combination instruction analysis adds syntactic logic for judging and identifying the combination instruction. Firstly, searching whether the instruction set has the combined instruction or not, if not, carrying out syntactic analysis on the combined instruction, decomposing the combined instruction into a plurality of existing basic instructions through the syntactic analysis, and integrating parameters required by the instruction and returned parameters from the instruction set. And if the analysis is successful, storing the newly added combined instruction in the instruction set.
As a specific implementation of step S300, the new instruction is parsed based on the instruction set, and the method includes three steps of splitting and combining the instruction, integrating the instruction hierarchy, and checking the instruction parameters.
Each new instruction corresponds to a combined instruction set, and the combined instructions are represented by combining with special signs, such as "{ }" used in fig. 3, and the combination is also limited by using fixed signs. The split-combine instruction is after the new instruction is decomposed into a plurality of existing base instructions based on special tag symbols.
Each new combined instruction is obtained by combining every two instructions in a plurality of instruction sets, and the running of each instruction has a precedence relationship which is embodied as the instruction hierarchy. The integration instruction hierarchy stores the base instructions obtained by decomposition in a binary tree form through a tree structure and executes the base instructions in sequence.
If the generation parameters of the instruction needing to be executed first in combination of the basic instructions are not satisfied, the instruction cannot be combined and the check is not passed, otherwise, the check is passed and the execution can be carried out.
Step 500 is an execution instruction, when a new instruction is executed, the basic instruction obtained by parsing the new instruction is executed in sequence, the target parameter required in the execution process is obtained from the temporary storage file, and the newly generated target parameter is stored in the temporary storage file to be provided for the next instruction.
The temporary storage file is used for storing a target result generated by the last basic instruction. And selectively storing the result obtained by the basic instruction according to a specific format according to the parameter required by the obtained basic instruction.
The extensible CLI functionality is further described with reference to fig. 2:
(1) a user inputs a user-defined new instruction, and the new instruction is obtained by combining the existing instructions;
(2) decomposing the new instruction into a plurality of base instructions on an instruction set basis by parsing;
(3) if the basic instructions obtained by decomposition can be found in the instruction set, the new instructions provided by the user are effective, otherwise, errors are prompted;
(4) writing a target result generated in the execution process of the basic instruction into a temporary storage file for the use of the next instruction;
(5) if the execution is successful, whether the instruction set contains the new instruction is checked, if yes, the operation is ended, if not, the name of the new combined instruction is prompted, and the new instruction is stored in the instruction set.
The method is mainly used in the operation of the CLI instruction, and provides an extensible combined instruction on the basis of the existing instruction by adding additional temporary storage and syntax analysis, so that the CLI instruction can be used more freely by a user, and meanwhile, the new instruction is obtained by combining and expanding the existing instruction, a recompiling process is not needed, the user does not need to master a source code, the use threshold is reduced, and the time is saved.
Example 2:
the invention relates to a dynamic expansion system of CIL instructions, which comprises a configuration module, a new instruction input module, an instruction analysis module, an instruction verification module, an instruction execution module and a new instruction storage module. The configuration module is used for configuring an instruction set, and the instruction set stores a plurality of basic instructions and instruction information newly added by a user; the new instruction input module is used for inputting a new instruction, and the new instruction is a combined instruction defined by self based on an existing instruction; for an input new instruction, the instruction analysis module is used for judging whether the new instruction exists in an instruction set or not, if not, the new instruction is subjected to syntax analysis on the basis of the instruction set, the new instruction is decomposed into a plurality of existing basic instructions, and required instruction information is integrated from the instruction set; the instruction checking module is used for checking the effectiveness of the decomposed basic instructions based on the instruction set, and if the decomposed basic instructions can be searched in the instruction set, the new instruction is effective and the instruction decomposition is successful; the instruction execution module is used for executing the new instruction, executing the decomposed basic instructions one by one, and writing related instruction information in the execution process into a temporary storage file so as to facilitate the use of the next instruction; and for the new instruction which is successfully executed, the new instruction storage module is used for checking whether the new instruction exists in the instruction set or not, and if the new instruction does not exist in the instruction set, naming the new instruction and storing the new instruction into the instruction set.
In this embodiment, the instruction set stores the own basic instructions and the instruction information added by the user in the form of a yaml file. The instruction information comprises an instruction alias, an instruction specific implementation instruction and instruction required parameters, wherein the instruction required parameters comprise instruction execution required parameters and instruction execution post-generation parameters. The 'instruction alias' is input for the instruction which is short for convenience for subsequent combination operation, the 'instruction specific implementation' is an instruction corresponding to actual execution in the instruction execution process, the 'parameter required by the instruction' is data required to be actively provided by a user in the instruction execution process, and the 'parameter generated after the instruction is executed' is used for matching a generated result of the instruction to a corresponding parameter and waiting for calling of other instructions.
Each instruction is stored in an instruction set, which contains 4 basic attributes, namely, the alias of the instruction, the specific implementation of the instruction, the parameters required by the instruction, and the parameters generated after the instruction is executed.
The combination of the instructions is obtained by converting and integrating the existing instructions in the instruction set, and whether the two instructions can be combined to generate a new instruction or not requires that the generation parameters of the instruction to be executed first are contained in the parameters required by the instruction to be executed later.
The new instruction is a combination instruction which is customized based on the existing instruction. Each new instruction corresponds to a combined instruction set, and the combined instructions are represented by combining special mark symbols, for example, using "{ }" and also using fixed marks to define the combination. Each new combined instruction is obtained by combining every two instructions in a plurality of instruction sets, and the running of each instruction has a precedence relationship which is embodied as the instruction hierarchy.
The instruction analysis module is used for searching whether the instruction set has the combined instruction or not, if not, carrying out syntactic analysis on the combined instruction, decomposing the combined instruction into a plurality of existing basic instructions through the syntactic analysis, and integrating parameters required by the instruction and returned parameters from the instruction set. And if the analysis is successful, storing the newly added combined instruction in the instruction set.
Based on the instruction set, the instruction analysis module analyzes the grammar of the new instruction through three steps, namely, dividing and combining the instruction, integrating the instruction level and inspecting the instruction parameters.
Each new instruction corresponds to a combined instruction set, the combined instructions are combined and expressed by using special mark symbols, and the combination is limited by using the '{ }' and a fixed mark. The split-combine instruction is after the new instruction is decomposed into a plurality of existing base instructions based on special tag symbols.
Each new combined instruction is obtained by combining every two instructions in a plurality of instruction sets, and the running of each instruction has a precedence relationship which is embodied as the instruction hierarchy. The integration instruction hierarchy stores the base instructions obtained by decomposition in a binary tree form through a tree structure and executes the base instructions in sequence.
If the basic instruction combination does not meet the requirement, the instruction cannot be combined and verified to be failed, otherwise, the verification is passed and the execution can be carried out.
When the new instruction is executed, the instruction execution module is used for sequentially executing the basic instructions obtained by analyzing the new instruction, acquiring the target parameters required in the execution process from the temporary storage file, and simultaneously storing the newly generated target parameters in the temporary storage file to be used by the next instruction.
The temporary storage file is used for storing a target result generated by the last basic instruction. And selectively storing the result obtained by the basic instruction according to a specific format according to the parameter required by the obtained basic instruction.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the embodiments disclosed, and it will be apparent to those skilled in the art that many more embodiments of the invention are possible that combine the features of the different embodiments described above and still fall within the scope of the invention.

Claims (10)

  1. A dynamic expansion method of CIL instruction is characterized in that an expandable combined instruction is provided on the basis of the existing instruction by adding a temporary storage and a syntax analysis mode, and the method comprises the following steps:
    configuring an instruction set, wherein the instruction set stores a plurality of basic instructions and instruction information newly added by a user;
    inputting a new instruction by a user, wherein the new instruction is a self-defined combined instruction based on an existing instruction;
    for an input new instruction, carrying out syntax analysis on the new instruction on the basis of the instruction set, decomposing the new instruction into a plurality of existing basic instructions, and integrating required instruction information from the instruction set;
    checking the effectiveness of the basic instructions obtained by decomposition based on the instruction set, wherein if the basic instructions obtained by decomposition can be searched in the instruction set, the new instructions are effective and the instructions are successfully decomposed;
    executing the new instruction, executing the decomposed basic instructions one by one, and writing related instruction information in the executing process into a temporary storage file so as to facilitate the use of the next instruction;
    and for the new instruction which is successfully executed, checking whether the new instruction exists in the instruction set, and if not, naming the new instruction and storing the new instruction in the instruction set.
  2. 2. The dynamic expansion method of CIL instruction according to claim 1, wherein said instruction set stores a plurality of basic instructions and user-added instruction information in the form of yaml file;
    the instruction information comprises an instruction alias, an instruction specific implementation instruction and parameters required by the instruction, wherein the parameters required by the instruction comprise parameters required by instruction execution and parameters generated after the instruction is executed;
    and executing the decomposed basic instructions one by one, reading parameters required by instruction execution from the temporary storage file, and writing the parameters generated after the instruction generated in the execution process is executed into the temporary storage file.
  3. 3. The dynamic extension method of CIL instruction of claim 1, wherein before parsing the new instruction, it is determined whether the new instruction exists in the instruction set, and if not, the new instruction is parsed.
  4. 4. The dynamic expansion method of CIL instruction according to any of claims 1-3 wherein said new instruction is a combined instruction obtained by combining two by two basic instructions already existing in multiple instruction sets, identified by a special tag;
    and running of each instruction in the new instruction has a precedence relationship, and the precedence relationship of the running of the instructions is an instruction level.
  5. 5. The method of claim 4, wherein parsing the new instruction based on the instruction set comprises:
    a split-combine instruction, the split-combine instruction being after the new instruction is decomposed into a plurality of existing base instructions based on special tokens;
    integrating the instruction hierarchy, wherein the integrated instruction hierarchy stores the basic instructions obtained by decomposition in a binary tree form and executes the basic instructions obtained by decomposition in sequence based on the integrated instruction hierarchy;
    and instruction parameter verification, wherein the instruction parameter verification is performed by the following method:
    the combination of the basic instructions needs to satisfy the following condition: the generation parameter of the first execution instruction is contained in the required parameter of the second execution instruction;
    if the new instruction is not satisfied, the new instruction cannot be combined, the check is not passed, and otherwise, the check is passed and the execution can be carried out.
  6. A dynamic extension system of a CIL instruction, characterized in that the CIL is dynamically extended by executing the dynamic extension method of a CIL instruction according to any of claims 1-5, said system comprising:
    the configuration module is used for configuring an instruction set, and the instruction set stores a plurality of basic instructions and instruction information newly added by a user;
    the new instruction input module is used for inputting a new instruction, and the new instruction is a combined instruction defined by the existing instruction;
    the instruction analysis module is used for judging whether the new instruction exists in an instruction set or not for the input new instruction, if not, the new instruction is subjected to syntax analysis on the basis of the instruction set, the new instruction is decomposed into a plurality of existing basic instructions, and required instruction information is integrated from the instruction set;
    the instruction checking module is used for checking the effectiveness of the basic instructions obtained by decomposition based on the instruction set, and if the basic instructions obtained by decomposition can be searched in the instruction set, the new instructions are effective and the instruction decomposition is successful;
    the instruction execution module is used for executing the new instructions, executing the decomposed basic instructions one by one, and writing related instruction information in the execution process into a temporary storage file so as to facilitate the use of the next instruction;
    and the new instruction storage module is used for checking whether the new instruction exists in the instruction set or not for the new instruction which is successfully executed, and naming the new instruction and storing the new instruction in the instruction set if the new instruction does not exist.
  7. 7. The dynamic expansion system of CIL instructions according to claim 6, characterized in that the instruction set stores a plurality of basic instructions and user added instruction information in the form of yaml files;
    the instruction information comprises an instruction alias, an instruction specific implementation instruction and parameters required by the instruction, wherein the parameters required by the instruction comprise parameters required by instruction execution and parameters generated after the instruction is executed;
    and for the decomposed basic instructions, the instruction execution module is used for executing the instructions one by one, reading parameters required by instruction execution from the temporary storage file, and writing the parameters generated after the instructions generated in the execution process are executed into the temporary storage file.
  8. 8. The dynamic extension system of CIL instructions according to claim 6, wherein before parsing the new instructions, the instruction parsing module is configured to determine whether the new instructions exist in the instruction set, and if not, parse the new instructions.
  9. 9. The dynamic expansion system of CIL instructions according to any of claims 6-8, characterized in that the new instructions are combined instructions obtained by combining two by two basic instructions already existing in a plurality of instruction sets, and are identified by special mark symbols;
    and running of each instruction in the new instruction has a precedence relationship, and the precedence relationship of the running of the instructions is an instruction level.
  10. 10. The system for dynamic extension of CIL instructions according to claim 9, characterized in that the execution parsing module is adapted to parse the new instruction based on the instruction set by:
    a split-combine instruction, the split-combine instruction being after the new instruction is decomposed into a plurality of existing base instructions based on special tokens;
    integrating the instruction hierarchy, wherein the integrated instruction hierarchy stores the basic instructions obtained by decomposition in a binary tree form and executes the basic instructions obtained by decomposition in sequence based on the integrated instruction hierarchy;
    and instruction parameter verification, wherein the instruction parameter verification is performed by the following method:
    the combination of the basic instructions needs to satisfy the following condition: the generation parameter of the first execution instruction is contained in the required parameter of the second execution instruction;
    if the new instruction is not satisfied, the new instruction cannot be combined, the check is not passed, and otherwise, the check is passed and the execution can be carried out.
CN202210245936.5A 2022-03-14 2022-03-14 Dynamic extension method and system of CIL (common information language) instruction Pending CN114610390A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210245936.5A CN114610390A (en) 2022-03-14 2022-03-14 Dynamic extension method and system of CIL (common information language) instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210245936.5A CN114610390A (en) 2022-03-14 2022-03-14 Dynamic extension method and system of CIL (common information language) instruction

Publications (1)

Publication Number Publication Date
CN114610390A true CN114610390A (en) 2022-06-10

Family

ID=81863031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210245936.5A Pending CN114610390A (en) 2022-03-14 2022-03-14 Dynamic extension method and system of CIL (common information language) instruction

Country Status (1)

Country Link
CN (1) CN114610390A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911240A (en) * 2023-09-12 2023-10-20 深圳鸿芯微纳技术有限公司 Command configuration method, device, equipment and medium of electronic automation design software

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911240A (en) * 2023-09-12 2023-10-20 深圳鸿芯微纳技术有限公司 Command configuration method, device, equipment and medium of electronic automation design software
CN116911240B (en) * 2023-09-12 2023-12-19 深圳鸿芯微纳技术有限公司 Command configuration method, device, equipment and medium of electronic automation design software

Similar Documents

Publication Publication Date Title
US7096420B1 (en) Method and system for automatically documenting system command file tags and generating skeleton documentation content therefrom
CN111209005B (en) Method and apparatus for compiling program file, and computer-readable storage medium
CN114096956A (en) Method and device for representing database operation layer
CN110543427B (en) Test case storage method and device, electronic equipment and storage medium
CN108664546B (en) XML data structure conversion method and device
CN106547765B (en) SQ L-based database management method and device
CN114610390A (en) Dynamic extension method and system of CIL (common information language) instruction
CN102236573A (en) Name binding extensibility for typed programming language
CN109947711B (en) Automatic multi-language file management method in IOS project development process
CN110941655B (en) Data format conversion method and device
CN115525534A (en) Test case generation method and platform based on swagger interface test
CN111596970B (en) Method, device, equipment and storage medium for dynamic library delay loading
US20090248741A1 (en) Method and system for integrating an external service
CN112785284A (en) Message storage method and device based on structured document
CN116521217A (en) Method, system and storage medium for rapidly configuring BSW based on AUTOSAR tool
CN114936045B (en) Automatic configuration method and system for IO driving module of MCAL and storage medium
CN114661298A (en) Automatic public method generation method, system, device and medium
CN109509467B (en) Code generation method and device
CN111796832B (en) Hot patch file generation method, device, equipment and storage medium
CN114942781A (en) Data format adaptation method and device for data reading
JPH11272503A (en) Device for automatically generating test data of program
CN113448852A (en) Test case obtaining method and device, electronic equipment and storage medium
CN114115900A (en) Script compiling method and device and electronic equipment
CN113448982A (en) DDL statement analysis method and device, computer equipment and storage medium
CN111562907A (en) Conversion method and system of user-defined interface data

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