CN109343855A - The program compiling grasping system and method pretended based on instruction - Google Patents
The program compiling grasping system and method pretended based on instruction Download PDFInfo
- Publication number
- CN109343855A CN109343855A CN201811150584.5A CN201811150584A CN109343855A CN 109343855 A CN109343855 A CN 109343855A CN 201811150584 A CN201811150584 A CN 201811150584A CN 109343855 A CN109343855 A CN 109343855A
- Authority
- CN
- China
- Prior art keywords
- instruction
- file
- compiling
- camouflage
- crawl
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
The program compiling grasping system and method pretended based on instruction the invention discloses one kind, wherein, the system includes: the currently used instruction that instruction camouflage module is used to obtain crawl object, will pretend instruction and substitute currently used instruction, and indicates that compiling grasping means executes camouflage instruction;Order parameter processing module is used to identify instruction execution type according to the key message of camouflage instruction, and obtains the source file and file destination of currently used instruction;Dependent file handling module, which is used to be obtained according to instruction execution type, executes all intermediate files in camouflage instruction process, chained library, dependent file and/or compiling destination file, obtains and store the destination file of crawl.The system can be in the presence of prosthetic, it is supplied directly to Static Analysis Technology or other processing carries out the related check of program, avoid situations such as file is lost when compiling crawl caused by file is deleted in compilation process, and multi-platform compiling is supported, so that without additional third-party Resource Dependence.
Description
Technical field
The present invention relates to procedural items to compile crawl technical field, in particular to a kind of program compiling pretended based on instruction
Grasping system and method.
Background technique
Static Analysis Technology refers under the premise of not executing program, passes through syntactic analysis, control stream and Data Stream Processing
The methods of code is analyzed, the program tested to indexs such as normalization, the safety and reliabilities of program analyzes skill
Art.
In the traditional processing method of static analysis, needs to specify program manually, additionally need manually to journey
Sequence pre-process etc. operation, and this actual in use, especially having biggish inconvenience towards fairly large procedural item.
Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.
For this purpose, an object of the present invention is to provide the programs that one kind is pretended based on instruction to compile grasping system.
It is another object of the present invention to propose a kind of program compiling grasping means pretended based on instruction.
In order to achieve the above objectives, one aspect of the present invention proposes a kind of program compiling grasping system pretended based on instruction,
Include: the currently used instruction that instruction camouflage module is used to obtain crawl object, it is described currently used that instruction substitution will be pretended
Instruction, and indicate that compiling grasping means executes the camouflage instruction;Order parameter processing module is used to be instructed according to the camouflage
Key message identify instruction execution type, and obtain the source file and file destination of the currently used instruction;Rely on text
Part handling module, which is used to execute type according to described instruction to obtain, executes all intermediate files, link in the camouflage instruction process
Library, dependent file and/or compiling destination file, obtain and store the destination file of crawl.
The program compiling grasping system of the embodiment of the present invention pretended based on instruction, by making in the practical compiling to program
Configuration is handled, it is straightforward to provide carries out the normalization of program, safety to Static Analysis Technology or other processing
With the inspection of reliability etc., and artificial participation is not needed during compiling crawl;To compile by way of instruction camouflage
The compatible more preferable of instruction is translated, when supporting parallel compilation, while also avoiding compiling crawl caused by file is deleted in compilation process
Situations such as file is lost, and more have safety and correctness;In addition, crawl is originally without additional third-party Resource Dependence
Body is not limited by platform, can solve target problem on different platforms.
In addition, it is according to the above embodiment of the present invention pretend based on instruction program compiling grasping system can also have with
Under additional technical characteristic:
Further, in one embodiment of the invention, described instruction camouflage module is system environments when modification executes
Middle instruction map paths relationship, to replace the currently used instruction, wherein when calling camouflage instruction, be first carried out
Present instruction, with after having executed the present instruction, instruction compiling is grabbed.
Further, in one embodiment of the invention, described instruction execute type include intermediate file generate type,
Chained library generates type and destination file generates type.
Further, in one embodiment of the invention, the dependent file handling module is further used for: in described
Between file generated be that grasping means is carried out, export is by pretreated described by the special parameter in replacement script sentence
Source file is directly used in the inspection of code static analysis tool;The chained library generates the crawl of type, creates a chain first
The independent file in library is connect, and the pre-processed results for the source file that it is relied on successively are stored in the independent file
In;The destination file generates the instruction crawl of type, the independent file of a chained library is created first, to the result
Its pre-processed results is successively stored in the independent file, to the destination file by the source code that file is relied on
The link library file relied on, the destination file folder to grab before the link library file create soft link and save.
Further, in one embodiment of the invention, the crawl object is the program items of executable compiling instruction
Mesh.
In order to achieve the above objectives, another aspect of the present invention proposes the program compiling grasping means pretended based on instruction, packet
It includes following steps: obtaining the currently used instruction of crawl object, instruction will be pretended and substitute the currently used instruction, and indicated
It compiles grasping means and executes the camouflage instruction;Instruction execution type is identified according to the key message of the camouflage instruction, and is obtained
To the source file and file destination of the currently used instruction;The type acquisition execution camouflage is executed according to described instruction to refer to
All intermediate files, chained library, dependent file and/or compiling destination file during order, obtain and store the result text of crawl
Part.
The program compiling grasping means of the embodiment of the present invention pretended based on instruction, by making in the practical compiling to program
Configuration is handled, it is straightforward to provide carries out the normalization of program, safety to Static Analysis Technology or other processing
With the inspection of reliability etc., and artificial participation is not needed during compiling crawl;To compile by way of instruction camouflage
The compatible more preferable of instruction is translated, when supporting parallel compilation, while also avoiding compiling crawl caused by file is deleted in compilation process
Situations such as file is lost, and more have safety and correctness;In addition, crawl is originally without additional third-party Resource Dependence
Body is not limited by platform, can solve target problem on different platforms.
In addition, it is according to the above embodiment of the present invention pretend based on instruction program compiling grasping means can also have with
Under additional technical characteristic:
Further, in one embodiment of the invention, described that camouflage instruction is substituted into the currently used instruction, into
One step includes: to instruct map paths relationship in system environments when modification executes, to replace the currently used instruction, wherein
When the camouflage being called to instruct, present instruction is first carried out, with after having executed the present instruction, instruction compiling is grabbed.
Further, in one embodiment of the invention, described instruction execute type include intermediate file generate type,
Chained library generates type and destination file generates type.
Further, in one embodiment of the invention, described to be obtained described in execution according to described instruction execution type
Pretend all intermediate files in instruction process, chained library, dependent file and/or compiling destination file, further comprises: in described
Between file generated be that grasping means is carried out, export is by pretreated described by the special parameter in replacement script sentence
Source file is directly used in the inspection of code static analysis tool;
The chained library generates the crawl of type, creates the independent file of a chained library first, and by its institute according to
The pre-processed results of bad source file are successively stored in the independent file;The destination file generates the instruction of type
Crawl, the independent file for creating a chained library first pre-process the source code that the destination file is relied on
As a result it is successively stored in the independent file, is the link to the link library file that the destination file is relied on
The destination file folder grabbed before library file creates soft link and saves.
Further, in one embodiment of the invention, the crawl object is the program items of executable compiling instruction
Mesh.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partially become from the following description
Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments
Obviously and it is readily appreciated that, in which:
Fig. 1 is to compile grasping system structural schematic diagram according to the program of one embodiment of the invention pretended based on instruction;
Fig. 2 is to compile grasping system frame diagram according to the program pretended based on instruction of one specific embodiment of the present invention;
Fig. 3 is the succession frame diagram according to the design and camouflage instruction of the public characteristic body of one embodiment of the invention;
Fig. 4 is the order parameter processing module flow diagram according to one embodiment of the invention;
Fig. 5 is to compile grasping means flow chart according to the program of one embodiment of the invention pretended based on instruction.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
The program compiling grasping system pretended based on instruction for describing to propose according to embodiments of the present invention with reference to the accompanying drawings
And method, the program compiling crawl system pretended based on instruction for describing to propose according to embodiments of the present invention first with reference to the accompanying drawings
System.
Fig. 1 is the program compiling grasping system structural schematic diagram of one embodiment of the invention pretended based on instruction.
As shown in Figure 1, the program pretended based on instruction compiling grasping system 10 includes: instruction camouflage module 100, instruction
Parameter processing module 200 and dependent file handling module 300.
Wherein, instruction camouflage module 100 is used to obtain the currently used instruction of crawl object, will pretend instruction substitution and work as
It is preceding to use instruction, and indicate that compiling grasping means executes camouflage and instructs.Order parameter processing module 200 is used to be instructed according to camouflage
Key message identify instruction execution type, and obtain the source file and file destination of currently used instruction.Dependent file is grabbed
Modulus block 300, which is used to be obtained according to instruction execution type, to be executed all intermediate files in camouflage instruction process, chained library, relies on text
Part and/or compiling destination file, obtain and store the destination file of crawl.The system 10 of the embodiment of the present invention can not need
Under artificial participation, it is supplied directly to Static Analysis Technology or other processing carries out the related check of program, avoid compiled
Situations such as file is lost when compiling crawl caused by file is deleted in journey, and supports multi-platform compiling, so that without additional the
The Resource Dependence of tripartite.
Further, in one embodiment of the invention, crawl object can be the program items of executable compiling instruction
Mesh.
Specifically, crawl object is the procedural item that can execute compiling instruction, including but not limited to using compiling rule
Then command script is compiled the procedural item of operation.
Further, in one embodiment of the invention, instruction camouflage module is system environments middle finger when modification executes
Map paths relationship is enabled, to replace currently used instruction, wherein call camouflage instruction when, present instruction is first carried out, with
After having executed present instruction, instruction compiling crawl.
That is, as shown in Fig. 2, to compiling used in instruction pretend, road is instructed in system environments to modify
The mode of diameter mapping relations replaces the instruction of actual use, camouflage instruction in use, in addition to complete instruction script hold with
Outside, the execution of instruction compiling grasping means.By the key message in analysis instruction sentence, instruction type (intermediate file is known
Generate, chained library generates, destination file generates), extract the file destination of the instruction source file used and generation.Processing is compiled
The intermediate file of whole involved in process generates, chained library generates and dependent file is collected, compiling destination file generates, and right
The preservation that the destination file of compiling crawl is standardized.
Further, in one embodiment of the invention, instruction execution type includes that intermediate file generates type, link
Library generates type and destination file generates type.
Optionally, in one embodiment of the invention, dependent file handling module is further used for: intermediate file generates
It is that grasping means is carried out by the special parameter in replacement script sentence, export is passed through pretreated source file, is directly used in
The inspection of code static analysis tool.Chained library generates the crawl of type, creates the independent file of a chained library first,
And the pre-processed results for the source file for being relied on it are successively stored in independent file.The finger of destination file generation type
Crawl is enabled, the independent file for creating a chained library first is pre-processed knot to the source code that destination file is relied on
Fruit is successively stored in independent file, to the link library file that destination file is relied on, grabs before linking library file
Destination file folder creates soft link and saves.
To be more clear the embodiment of the present invention, the embodiment of the present invention is described in further detail below.
(1) instruction camouflage module, devises the individual (public characteristic body) for having public characteristic first.Such as Fig. 3 institute
Show, the execution type of an instruction is had recorded in public characteristic body, i.e., intermediate file generates, chained library generates or destination file
It generates.There is the file destination that special mode saves the file destination for instructing used source file, instruction to generate, instruction generates
Path, the title of former instruction, the Actual path of former instruction, the current path executed instruction, order parameter, current environment variable,
Journal file path, compiling crawl output file path, and execute the project root path of compiling crawl.
In addition to this, public characteristic body has following functions: script is instructed and carries out execution operation, operation log recording,
Analysis parameter knows the execution type of instruction, analyzes parameter and records used source file and file destination, and is directed to three
The implementation strategy of the corresponding compiling destination file crawl of kind instruction type.
Public characteristic body is the camouflage instruction an of standard, so other camouflage instructions are only other than public characteristic body
It needs to inherit the characteristic of public characteristic body, and personalized part is transformed.Such as certain instruction needs " analyzing parameter to obtain
Know the execution type of instruction " this upper rewriting, some order parameters are respectively processed.After the camouflage for completing instruction,
The instruction that actual use is replaced by way of instructing map paths relationship in modification system environments, when compiling crawl,
With original instruction in the instruction alternative system of camouflage and execute.
(2) order parameter processing module knows instruction type by the key message in analysis instruction sentence, such as Fig. 4 institute
Show, be exemplified below: Mr. Yu is instructed, parameter A correspondence can generate link library file, and such case just corresponds to " chained library generation " class
Type;Parameter B and parameter C is that source file compiling is become intermediate file as a result, i.e. corresponding " intermediate file generation " type;This refers to
It is for generating executable text if not including parameter D (only doing pretreatment operation to source file) again if not enabling above situation
Part is to belong to " destination file generation " type in this way.
Other than carrying out instruction type and knowing, order parameter processing module also extracts the source file and life that instruction uses simultaneously
At file destination, such as " destination file generation " type instruction " certain instruction source file A parameter A file destination B ", even if
File destination B is generated with source file A.The case where other two types instruct is similar.
(3) dependent file handling module generates the intermediate file for handling whole involved in compilation process, chained library life
At and dependent file is collected, compiling destination file generates, the preservation that is standardized of destination file to compiling crawl.Dependent file
Crawl, for it is different types of instruction have different processing strategies." intermediate file generation " passes through in replacement script sentence
Special parameter is grabbed, and pretreated source file is passed through in export, is used directly for the inspection of code static analysis tool
It looks into.The crawl of " chained library generation " type instruction, will create the independent file of the chained library first, and by its institute according to
The pre-processed results of bad source file are successively stored in this document folder.Crawl for " destination file generation " type instruction,
The independent file for equally first creating the chained library pre-processes the source code that the destination file is relied on
As a result it is successively stored in this document folder, for the link library file that the destination file is relied on, to be grabbed before link library file
The destination file folder taken creates soft link and saves.
Next the program compiling crawl system pretended based on instruction the embodiment of the present invention proposed in conjunction with specific embodiments
System is described in detail.
For example, current only carried out tool realization to the present invention in C language software program, and to open source C language project
Gzip (version number 1.9, project home page http://www.gzip.org/) has carried out compiling crawl.
The result of compiling crawl shares 85 intermediate result files, 2 link library files and 1 file destination.
(1) wherein (intermediate file of gzip compiling crawl is believed in specific embodiment for 85 intermediate result files such as the following table 1
Breath) shown in:
Table 1
(2) wherein link library file lib/libgzip.a relies on 72 intermediate files, such as (the link library file lib/ of table 2
The listed files that libgzip.a is relied on) shown in:
Table 2
(3) wherein link library file libver.a relies on 1 intermediate file, as (link library file libver.a is relied on table 3
Listed files) shown in:
Table 3
Serial number | Filename |
85 | versionoi |
(4) wherein destination file gzip relies on 12 intermediate files and 2 link library files, such as 4 (destination file of table
The listed files that gzip is relied on) shown in:
Table 4
In conclusion the program compiling grasping system of the embodiment of the present invention pretended based on instruction is compared to other current phases
Pass technology, has several advantages that
(1) compiling crawl process automation
The procedural item that can be compiled only need to be provided, all journeys that executable program relies in the project can be obtained
Sequence, and program is configured according to used in practical compiling and is handled.These treated programs, it is straightforward to provide give
Static Analysis Technology or other processing carry out normalization, the inspection of safety and reliability etc. of program.Compile the process of crawl
In do not need artificial participation.
(2) transparence of synchronous execution method
The system pretended based on instruction, all compiling crawls are synchronous in the instruction after camouflage to be executed, Er Fei
It is just adjusted after the compiling instruction of entire project.The transparence of this synchronization execution method, is embodied in whole process to originally
Compiling do not have an impact so that the compatibility of compiling instruction is more preferable, support parallel compilation, while also avoiding compilation process Chinese
Situations such as file is lost when compiling crawl caused by part is deleted.The characteristic of transparence, so that compiling grasping system has safety
And correctness.
(3) generalization of compatible different platform
The program compiling grasping system pretended based on instruction, without additional third-party Resource Dependence, itself is not by flat
The limitation of platform can solve target problem on different platforms.
The program compiling grasping system pretended based on instruction proposed according to embodiments of the present invention, passes through the reality to program
Configuration used in compiling is handled, it is straightforward to provide the specification of program is carried out to Static Analysis Technology or other processing
Property, the inspection of safety and reliability etc., and do not need artificial participation during compiling crawl;Pass through the side of instruction camouflage
The compatibility that formula instructs compiling is more preferable, supports parallel compilation, while also avoiding compiling caused by file is deleted in compilation process
Situations such as file is lost when translating crawl, and more have safety and correctness;In addition, without additional third-party resource according to
Rely, crawl is not limited itself by platform, can solve target problem on different platforms.
The program pretended based on instruction proposed according to embodiments of the present invention referring next to attached drawing description compiles grasping means.
Fig. 5 is the program compiling grasping means flow chart of one embodiment of the invention pretended based on instruction.
As shown in figure 5, the program pretended based on instruction compiling grasping means the following steps are included:
In step s101, the currently used instruction for obtaining crawl object will pretend instruction and substitute currently used instruction,
And indicate that compiling grasping means executes camouflage instruction.
Further, in one embodiment of the invention, crawl object is the procedural item of executable compiling instruction.
Further, in one embodiment of the invention, camouflage instruction is substituted into currently used instruction, further wrapped
It includes: map paths relationship is instructed when modification executes in system environments, to replace currently used instruction, wherein camouflage is being called to refer to
When enabling, present instruction is first carried out, with after having executed present instruction, instruction compiling is grabbed.
In step s 102, instruction execution type is identified according to the key message of camouflage instruction, and obtains currently used finger
The source file and file destination of order.
Further, in one embodiment of the invention, instruction execution type includes that intermediate file generates type, link
Library generates type and destination file generates type.
In step s 103, it is obtained according to instruction execution type and executes all intermediate files, link in camouflage instruction process
Library, dependent file and/or compiling destination file, obtain and store the destination file of crawl.
Further, in one embodiment of the invention, it is obtained according to instruction execution type and executes camouflage instruction process
In all intermediate files, chained library, dependent file and/or compiling destination file, further comprise: intermediate file generation be to pass through
The special parameter in script sentence is replaced, grasping means is carried out, export passes through pretreated source file, it is quiet to be directly used in code
The inspection of state analysis tool;Chained library generate type crawl, first create a chained library independent file, and by its
The pre-processed results of the source file relied on are successively stored in independent file;The instruction that destination file generates type is grabbed
Take, create the independent file of a chained library first, to the source code that destination file is relied on, by its pre-processed results according to
It is secondary to be stored in independent file, to the link library file that destination file is relied on, for the result grabbed before link library file
File creates soft link and saves.
It should be noted that the applicable object of the compiling grasping means of the embodiment of the present invention can execute compiling instruction
Procedural item is including but not limited to compiled the procedural item of operation using compiling regular instructions script.By to compiling institute
The instruction used is pretended, and the finger of actual use is replaced by way of instructing map paths relationship in modification system environments
It enables, in camouflage instruction in use, other than the execution for completing instruction script, will handle and save involved in compilation process
Whole intermediate files generates, chained library generates and dependent file is collected, compiling destination file generates and dependent file is collected, and compiles
The result for translating crawl can be used for code Static Analysis Technology or other processing.
In short, the program proposed by the present invention pretended based on instruction compiles the main step of grasping means based on the above contents
Suddenly are as follows:
(1) it is instructed by camouflage, the instruction actually used in alternative Process, other than completing the execution of instruction script,
Indicate the execution of compiling grasping means;Wherein, map paths relationship is instructed in system environments when instruction camouflage is executed by modification
Mode replace the instruction of actual use, complete the execution of instruction script first in the calling of camouflage instruction, refer to again after the completion
Show the execution of compiling grasping means.
(2) in the compiling grasping means in camouflage instruction, by the key message in analysis instruction sentence, know instruction
Type (intermediate file generates, chained library generates, destination file generates), extracts the target text of the instruction source file used and generation
Part;Wherein, the key message in instruction analysis method process instruction sentence knows instruction classification, and instructs used source
The file destination of file and generation carries out the export and preservation of result according to these information, and different types of instruction is corresponding not
Same processing strategie and method.
(3) after the relevant information for extracting instruction, file will be generated and dependent file is saved in a manner of standardizing, it is final to compile
The result of crawl can be used for code Static Analysis Technology or other processing.
It should be noted that the aforementioned explanation to the program pretended based on instruction compiling grasping system embodiment is also fitted
For this method, details are not described herein again.
The program compiling grasping means pretended based on instruction proposed according to embodiments of the present invention, passes through the reality to program
Configuration used in compiling is handled, it is straightforward to provide the specification of program is carried out to Static Analysis Technology or other processing
Property, the inspection of safety and reliability etc., and do not need artificial participation during compiling crawl;Pass through the side of instruction camouflage
The compatibility that formula instructs compiling is more preferable, supports parallel compilation, while also avoiding compiling caused by file is deleted in compilation process
Situations such as file is lost when translating crawl, and more have safety and correctness;In addition, without additional third-party resource according to
Rely, itself is not limited by platform, can solve target problem on different platforms.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance
Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include at least one this feature.In the description of the present invention, the meaning of " plurality " is at least two, such as two, three
It is a etc., unless otherwise specifically defined.
In the present invention unless specifically defined or limited otherwise, term " installation ", " connected ", " connection ", " fixation " etc.
Term shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or integral;It can be mechanical connect
It connects, is also possible to be electrically connected;It can be directly connected, can also can be in two elements indirectly connected through an intermediary
The interaction relationship of the connection in portion or two elements, unless otherwise restricted clearly.For those of ordinary skill in the art
For, the specific meanings of the above terms in the present invention can be understood according to specific conditions.
In the present invention unless specifically defined or limited otherwise, fisrt feature in the second feature " on " or " down " can be with
It is that the first and second features directly contact or the first and second features pass through intermediary mediate contact.Moreover, fisrt feature exists
Second feature " on ", " top " and " above " but fisrt feature be directly above or diagonally above the second feature, or be merely representative of
First feature horizontal height is higher than second feature.Fisrt feature can be under the second feature " below ", " below " and " below "
One feature is directly under or diagonally below the second feature, or is merely representative of first feature horizontal height less than second feature.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not
It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office
It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field
Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples
It closes and combines.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example
Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned
Embodiment is changed, modifies, replacement and variant.
Claims (10)
1. the program compiling grasping system that one kind is pretended based on instruction characterized by comprising
It is described currently used will to pretend instruction substitution for obtaining the currently used instruction of crawl object for instruction camouflage module
Instruction, and indicate that compiling grasping means executes the camouflage instruction;
Order parameter processing module for identifying instruction execution type according to the key message of the camouflage instruction, and obtains institute
State the source file and file destination of currently used instruction;And
Dependent file handling module is used to be executed according to described instruction in all in the type acquisition execution camouflage instruction process
Between file, chained library, dependent file and/or compiling destination file, obtain and store the destination file of crawl.
2. the program compiling grasping system according to claim 1 pretended based on instruction, which is characterized in that described instruction is pseudo-
Die-filling piece is to instruct map paths relationship in system environments when modification executes, to replace the currently used instruction, wherein adjusting
When being instructed with the camouflage, present instruction is first carried out, with after having executed the present instruction, instruction compiling is grabbed.
3. the program compiling grasping system according to claim 1 pretended based on instruction, which is characterized in that described instruction is held
Row type includes that intermediate file generates type, chained library generates type and destination file generates type.
4. the program compiling grasping system according to claim 1 pretended based on instruction, which is characterized in that the dependence text
Part handling module is further used for:
It is to carry out grasping means, export is located by pre- by replacing the special parameter in script sentence that the intermediate file, which generates,
The source file after reason, is directly used in the inspection of code static analysis tool;
The chained library generates the crawl of type, creates the independent file of a chained library first, and it is relied on
The pre-processed results of source file are successively stored in the independent file;
The destination file generates the instruction crawl of type, the independent file of a chained library is created first, to the knot
Its pre-processed results is successively stored in the independent file by the source code that fruit file is relied on, to the result text
The link library file that part is relied on, the destination file folder to grab before the link library file create soft link and save.
5. the program compiling grasping system pretended based on instruction described in -4 according to claim 1, which is characterized in that the crawl
Object is the procedural item of executable compiling instruction.
6. the program compiling grasping means that one kind is pretended based on instruction, which comprises the following steps:
The currently used instruction for obtaining crawl object will pretend instruction and substitute the currently used instruction, and indicate that compiling is grabbed
Method is taken to execute the camouflage instruction;
Instruction execution type is identified according to the key message of the camouflage instruction, and obtains the source text of the currently used instruction
Part and file destination;And
Type, which is executed, according to described instruction obtains all intermediate files in the execution camouflage instruction process, chained library, dependence text
Part and/or compiling destination file, obtain and store the destination file of crawl.
7. the program compiling grasping means according to claim 6 pretended based on instruction, which is characterized in that described to pretend
Instruction substitutes the currently used instruction, further comprises:
Map paths relationship is instructed when modification executes in system environments, to replace the currently used instruction, wherein calling institute
When stating camouflage instruction, present instruction is first carried out, with after having executed the present instruction, instruction compiling is grabbed.
8. the program compiling grasping means according to claim 6 pretended based on instruction, which is characterized in that described instruction is held
Row type includes that intermediate file generates type, chained library generates type and destination file generates type.
9. the program compiling grasping means according to claim 6 pretended based on instruction, which is characterized in that described according to institute
It states instruction execution type and obtains all intermediate files, chained library, dependent file and/or compiling in the execution camouflage instruction process
Destination file further comprises:
It is to carry out grasping means, export is located by pre- by replacing the special parameter in script sentence that the intermediate file, which generates,
The source file after reason, is directly used in the inspection of code static analysis tool;
The chained library generates the crawl of type, creates the independent file of a chained library first, and it is relied on
The pre-processed results of source file are successively stored in the independent file;
The destination file generates the instruction crawl of type, the independent file of a chained library is created first, to the knot
Its pre-processed results is successively stored in the independent file by the source code that fruit file is relied on, to the result text
The link library file that part is relied on, the destination file folder to grab before the link library file create soft link and save.
10. compiling grasping means according to the described in any item programs pretended based on instruction of claim 6-9, which is characterized in that
The crawl object is the procedural item of executable compiling instruction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811150584.5A CN109343855B (en) | 2018-09-29 | 2018-09-29 | Program compiling and grabbing system and method based on instruction camouflage |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811150584.5A CN109343855B (en) | 2018-09-29 | 2018-09-29 | Program compiling and grabbing system and method based on instruction camouflage |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109343855A true CN109343855A (en) | 2019-02-15 |
CN109343855B CN109343855B (en) | 2020-12-29 |
Family
ID=65307611
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811150584.5A Active CN109343855B (en) | 2018-09-29 | 2018-09-29 | Program compiling and grabbing system and method based on instruction camouflage |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109343855B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110377276A (en) * | 2019-07-19 | 2019-10-25 | 潍柴动力股份有限公司 | Source code file management method and equipment |
CN112363729A (en) * | 2020-11-23 | 2021-02-12 | 北京轩宇信息技术有限公司 | Monitoring method and device for multi-compiler hybrid compilation for static analysis |
CN112363729B (en) * | 2020-11-23 | 2024-05-14 | 北京轩宇信息技术有限公司 | Monitoring method and device for mixed compiling of multiple compilers for static analysis |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050050533A1 (en) * | 2003-09-02 | 2005-03-03 | International Business Machines Corporation | Optimizing compiler |
CN103413073A (en) * | 2013-07-09 | 2013-11-27 | 北京深思数盾科技有限公司 | Method and equipment for protecting JAVA executable program |
CN104636256A (en) * | 2015-02-17 | 2015-05-20 | 中国农业银行股份有限公司 | Memory access abnormity detecting method and memory access abnormity detecting device |
CN108446235A (en) * | 2018-03-21 | 2018-08-24 | 北京理工大学 | In conjunction with the fuzz testing critical data localization method of path label data variation |
-
2018
- 2018-09-29 CN CN201811150584.5A patent/CN109343855B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050050533A1 (en) * | 2003-09-02 | 2005-03-03 | International Business Machines Corporation | Optimizing compiler |
CN103413073A (en) * | 2013-07-09 | 2013-11-27 | 北京深思数盾科技有限公司 | Method and equipment for protecting JAVA executable program |
CN104636256A (en) * | 2015-02-17 | 2015-05-20 | 中国农业银行股份有限公司 | Memory access abnormity detecting method and memory access abnormity detecting device |
CN108446235A (en) * | 2018-03-21 | 2018-08-24 | 北京理工大学 | In conjunction with the fuzz testing critical data localization method of path label data variation |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110377276A (en) * | 2019-07-19 | 2019-10-25 | 潍柴动力股份有限公司 | Source code file management method and equipment |
CN112363729A (en) * | 2020-11-23 | 2021-02-12 | 北京轩宇信息技术有限公司 | Monitoring method and device for multi-compiler hybrid compilation for static analysis |
CN112363729B (en) * | 2020-11-23 | 2024-05-14 | 北京轩宇信息技术有限公司 | Monitoring method and device for mixed compiling of multiple compilers for static analysis |
Also Published As
Publication number | Publication date |
---|---|
CN109343855B (en) | 2020-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103577324B (en) | Static detection method for privacy information disclosure in mobile applications | |
CN108073400A (en) | Software automation construction method, server and storage medium | |
Delamaro et al. | Proteum/IM 2.0: An integrated mutation testing environment | |
US8966448B2 (en) | Techniques for debugging an application | |
US20110035746A1 (en) | job network auto-generation apparatus, a method and a program recording medium | |
US20110208855A1 (en) | Parameterized Computer Monitoring System | |
EP1027648B1 (en) | Apparatus for semi-automated generation and application of language conformity tests | |
CN112394942B (en) | Distributed software development compiling method and software development platform based on cloud computing | |
CN102866944B (en) | Pressure testing system and method | |
JP5208635B2 (en) | Information processing apparatus, information processing system, programming support method and program for supporting programming | |
CN104572231B (en) | Engineering transplantation method between different operation platform and device | |
CN108549535A (en) | A kind of efficient procedure parsing method and system based on file dependence | |
CN116450616A (en) | General heterogeneous relational database SQL migration method based on parse tree | |
Tavares et al. | Semistructured merge in JavaScript systems | |
KR102096017B1 (en) | Method and system for predicting software bugs by embedding source code based on an abstract syntax tree | |
Forgács et al. | Feasible test path selection by principal slicing | |
CN109343855A (en) | The program compiling grasping system and method pretended based on instruction | |
Saifan | Test Case Reduction Using Data Mining Classifier Techniques. | |
CN115794106A (en) | Method and system for analyzing configuration of binary protocol data of rail transit | |
JP2010140408A (en) | Source code converting device | |
CN108897678B (en) | Static code detection method, static code detection system and storage device | |
CN106649110A (en) | Software test method and system | |
CN109816038A (en) | A kind of Internet of Things firmware program classification method and its device | |
CN106919431A (en) | Code comparison method, equipment and system in continuous integrating | |
CN108287788A (en) | A kind of use-case step matching method based on test case, system |
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 |