Source: https://patents.google.com/patent/CN104737125A/en
Timestamp: 2020-08-10 09:18:46
Document Index: 502269424

Matched Legal Cases: ['arts 120', 'arts 120', 'arts 120', 'arts 121', 'arts 121', 'arts 121', 'arts 121', 'arts 121', 'arts 120', 'arts 120']

CN104737125A - Maintaining integrity of output of code generators - Google Patents
CN104737125A
CN104737125A CN201380054687.0A CN201380054687A CN104737125A CN 104737125 A CN104737125 A CN 104737125A CN 201380054687 A CN201380054687 A CN 201380054687A CN 104737125 A CN104737125 A CN 104737125A
CN201380054687.0A
CN104737125B (en
R·J·麦迪逊
J·A·比文
R·S·古娜拉提
2013-06-12 Application filed by 国际商业机器公司 filed Critical 国际商业机器公司
2013-06-12 Priority to PCT/IB2013/054818 priority patent/WO2014064545A1/en
2015-06-24 Publication of CN104737125A publication Critical patent/CN104737125A/en
2018-03-06 Publication of CN104737125B publication Critical patent/CN104737125B/en
Method and system are provided for maintaining integrity of the output of code generators. The method may include: determining a generated output which has been generated from an original model; analyzing the generated output to infer contents of an inferred version of the original model; comparing the inferred version of the original model with a current version of the original model to detect differences in source elements; and using detected differences to identify redundant elements in the generated output. The step of determining a generated output may include inputting files or content of a file system and reverse engineering applying customised rules based on the original model to identify generated output. The step of analyzing the generated output to infer contents of an inferred version of the original model may include reverse engineering the generated output applying customised rules based on the original model.
Safeguard the integrality that code generator exports
The present invention relates to code building field, especially the present invention relates to the integrality (integrity) safeguarded code generator and export.
Code building or automated programming describe a process, wherein explain " model " of (such as, catching in xml) certain form by code generator and convert thereof into program code and other resources.
Such as, the table name that certain model can catch such as database table adds the information in territory in this table and so on.Then code building application program can create Structured Query Language (SQL) (SQL) statement and define these elements in specific type of data storehouse, and therewith create Java (Java is the registered trademark of SunMicrosystems company) code, retrieve and revise their value for sequencing.
The attractive force of code generator, be that they can to encapsulate specific knowledge and best practice, and prevent the mode of mistake expensive, consuming time, that introduced by the error of people, according to (normally simple) input, create fast and as one man (normally complicated) output.The user of code building application program is passable, such as, and easily and reliably definition database table, and do not need the expert becoming various database technology.
But the essential problem of code generator is, they operate with the pattern of " only writing "; They send output, but do not safeguard output.So, if an entry is deleted (or rename) from certain model, even if so this entry does not reconstruct a part for this model, from former code building, the output relevant to this entry also exists.This cause the hash of redundancy (clutter) build up, and the hash of redundancy can disturb more recent output, thus causes makeing mistakes.
High-quality elaborated code is created because code generator becomes the user interface be more usually used in from simplifying, the ability of the consistance (consistency) between maintenance source and output may more and more be worried, this worry may suppress the acceptance level to code Generation.
Therefore, prior art kind needs to solve the problem.
According to a first aspect of the invention, providing a kind of method for safeguarding the integrality that code generator exports, comprising: determine that the generation generated based on master pattern by particular code generation application program exports; Analyze the described content generating the deduction version exported to infer master pattern; The deduction version of described master pattern and the current version of master pattern are compared, with the difference of detection resources element; And use the difference detected to determine to generate the redundant elements in exporting described.
Determine that generating output comprises: the file of input file system or content and application generate the operation of application program customizable rule based on particular code is carried out reverse-engineering to identify generating and exported.
Analyze described generation output to comprise with the content of the deduction version of inferring master pattern: export application to described generation and carry out reverse-engineering based on the customizable rule of the operation to described particular code generation application program.
Described customizable rule generates application program for naming and/or the rule of content of master pattern according to particular code.
Described customizable rule comprises the baseset of instruction and entrusts to customized logic as required.
The file of scanning document system or content are found out and the mating of the file name pattern defined in described customizable rule, wherein said file name pattern is completely qualified file name pattern, and this filename of position matching does not still allow the file mating catalogue.
Described scanning comprises and checks whether the filename that matches conforms to one or more extra instruction of specifying in described customizable rule, the signature contents that the content that wherein extra instruction comprises expecting is form.
Use the file name pattern with the coupling of the naming variable of location to infer the source element of the deduction version of described master pattern.
The described deduction version of described master pattern and the current version of described master pattern are compared, with the difference of detection resources element, comprises and the described content of the content of the deduction version of described master pattern and the current version of described master pattern is compared.
Relatively comprise: the content and structure of the content and structure of the deduction version of described master pattern and the current version of described master pattern is compared.
In one embodiment, the described deduction version of described master pattern and the current version of described master pattern are compared, with the difference of detection resources element, comprise a kind of mode of rule one by one, wherein, scan-data to find out every rule, and partly creates described Inference Model in memory to allow to carry out the comparison to this rule.
In another embodiment, the described deduction version of described master pattern and the current version of described master pattern are compared, with the difference of detection resources element, comprise the whole deduction version and execution model directly comparing model that build described master pattern in memory.
The method can comprise the described redundant elements generating output of automatically filing or deleting and identifying.
According to a second aspect of the invention, providing a kind of system for safeguarding the integrality that code generator exports, comprising: generate and export identification component, for determining that the generation generated based on master pattern by particular code generation application program exports; Inference Model generating unit, for analyzing the described content generating the deduction version exported to infer master pattern; Comparing unit, for comparing the deduction version of described master pattern and the current version of master pattern, with the difference of detection resources element; And cleaning member, determine for using the difference detected to generate the redundant elements in exporting described.
Described generation exports identification component and determines that generating output comprises: the file of input file system or content and application generate the operation of application program customizable rule based on particular code is carried out reverse-engineering to identify generating and exported.
Inference Model generating unit comprises with the content of the deduction version of inferring master pattern for analyzing described generation output: export application to described generation and carry out reverse-engineering based on the customizable rule of the operation to described particular code generator program.
Described generation exports identification component and also finds out and the mating of the file name pattern defined in described customizable rule for the file of scanning document system or content, wherein said file name pattern is completely qualified file name pattern, and this filename of position matching does not still allow the file mating catalogue.
Export identification component in described generation, described scanning comprises and checks whether the filename matched conforms to one or more extra instruction of specifying in described customizable rule, the signature contents that the content that wherein extra instruction comprises expecting is form.
Export identification component in described generation, use the file name pattern with the coupling of the naming variable of location to infer the source element of the deduction version of described master pattern.
At described cleaning member also for also generating for automatically filing or deleting identify described the redundant elements exported.
According to a third aspect of the invention we, provide a kind of computer program for safeguarding the integrality that code generator exports, described computer program comprises: the computer-readable recording medium of the instruction fetch of can be processed circuit and storage, is performed the method performed according to a first aspect of the present invention by described treatment circuit.
According to a forth aspect of the invention, provide and be stored in computer-readable recording medium and the computer program that can be loaded into digital machine internal memory, comprise software code partition, when said program is run on, perform method according to a first aspect of the present invention.
According to a fifth aspect of the invention, a kind of method is provided in essence described by reference accompanying drawing.
According to a sixth aspect of the invention, provide in a kind of system nature as with reference to described by accompanying drawing.
Embodiment described in the invention provides its advantage, and namely it can be used for the analysis of backtracking property, does not need to revise application program and inherently correction codes can generate the output of application program.
To particularly point out about theme of the present invention and clearly claimed at the conclusion part of instructions.Tissue of the present invention and method of operating and object, feature and advantage, can do best understanding by reading with reference to detailed description with the accompanying drawing below.
Referring now to the following drawings, by means of only the mode of citing, the preferred embodiments of the present invention are described, wherein:
Fig. 1 is the example block diagram of system according to the invention embodiment;
Fig. 2 is the block diagram that the present invention may be used for the computer system embodiment implemented;
Fig. 3 is the process flow diagram of the exemplary embodiment of an aspect according to method of the present invention; And
Fig. 4 is the process flow diagram of the exemplary embodiment of another aspect according to method of the present invention.
Should be appreciated that, in order to simply and clearly illustrate, element shown in the figure may not be drawn in proportion.Such as, in order to clear, the size of some elements may be exaggerated by relative to other element.In addition, when thinking fit, reference number can repeat in multiple accompanying drawing, to indicate corresponding or similar feature.
In the following detailed description, many concrete details are set forth to provide thorough understanding of the present invention.But, skilled person in the art will appreciate that the present invention can implement when not having these details.In other instances, in order to avoid covering essence of the present invention, to well-known method, process and parts, detailed description is not given.
The file in file system (and/or their content) provides the method and system of the reverse-engineering for code generation process, so that can be used to infer the source model content with very high reliability.Inferred model content can be compared with any current model, to detect the change of having applied since code building.According to this knowledge, the generation resource of (file and/or delete) redundancy just " can be cleared up ", to ensure the consistance between current source model and the code generated.
In order to carry out reverse-engineering to the content of file system, to infer that a) particular code generates the material of application program output; And hash b) representing redundancy, the subset of this material that therefore can be automatically removed, propose a kind of framework, this framework can process the rule of definition, and appoints the logic of customization as required.
In order to infer source model, the code that reverse-engineering produces utilizes following true: code generator follow about generates the name of output and/or the predictable rule of content, and the information defined in original source is injected into output.For example above-mentioned, this is injected into table and field name the file meeting conventional SQL and Java grammer by comprising.It should be noted that code generator does not export arbitrary structures or random data.
Therefore, the rule of the particular type describing generation output may be defined and any file and such rule are compared, highly accurately determine that whether it is (or comprising) output from code generator, and the source element whether being injected into it still exists at source model.
If can determine, the some parts of file or file content represents the output generating application program from particular code, and any original source element all no longer occurs (due to deleted or rename), and so output item represents the hash of redundancy that can be deleted.
Described method and system ensures to generate the integrality exported by infer source material and the property recalled from customizable rule (retrospectively).
But in practice, perform this task and must overcome performance difficulty, reason is, the All Files in file system may all must be examined, and must avoid be seemingly but the wrong report (false positives) be not the data of generated code being form.
With reference to figure 1, block diagram shows the exemplary embodiment of described system 100.
Can provide master pattern 101, from this model, code building application program 110 generates with program code or resource to be form generation exports (generated output) 102.
Described method provides safeguards that the conforming output generating output 102 upgrades parts 120.It can be code building application program part of the whole that this output upgrades parts 120, or also can be discrete with it.
Code update parts 120 can comprise reverse-engineering parts 121, and the form of the latter has the customizable regulation engine of regular 122, and customizable regular 122 make it possible to export 102 to the generation of code building application program 110 carries out reverse-engineering.It can be the generation output generation customizable regular 122 of particular type.Code building application program 110 follows the rule predicted of generator program code or resource usually, and also information is injected into output from master pattern 101.This foreseeable rule can be used for the rule customizing reverse-engineering parts 121.
Reverse-engineering parts 121 can using have in it generate output 102 the file of file system 106 or content as input, reverse-engineering parts 121 can comprise one and generate output identification component 123, it is for determining file, code or content, represents the output generating application program 110 from particular code.Exporting identification component 123 can use customizable regular 122 to accomplish this point.
Reverse-engineering parts 121 also can comprise an Inference Model generating unit 124, and it generates the content and structure of Inference Model 103 for using customizable regular 122 from generation output 102.Customizable regular 122 submit necessary information exports 102 based on the generation that detects and infers what master patterns must appear to.
In ideal conditions, an Inference Model 103 be equal to each details of master pattern 101 can be created.In practice, may be variant, such as, the document in master pattern may not generate material in, so can not be replicated in Inference Model 103.But, unless generation output 102 in have ambiguity, otherwise, likely set up an Inference Model 103, its content comprised enough for: a) active view of model 104 is compared; Or b) actual re-creating generates output 102.
Output renewal parts 120 can comprise the comparing unit for the content of Inference Model 103 being compared with the "current" model 104 corresponding to master pattern 101.Comparing unit 125 can detect any change being applied to master pattern 101 since self-generating output 102 is created.
Export renewal parts 120 and can comprise a cleaning member 126, for filing and/or deleting any present existence of redundant generating output 102, export 105 to provide the generation after cleaning.
With reference to figure 2, the example system that the present invention realizes aspect comprises the data handling system 200 being applicable to the program code storing and/or perform, and comprises the processor 201 being at least connected to storage unit by system bus 203 directly or indirectly.Storage unit can comprise program code actual the term of execution use local storage, massage storage and the term of execution must fetch the number of times of code, the cache memory of the interim storage of at least some program code is provided from massage storage to reduce.
Storage unit can comprise the system storage 202 of ROM (read-only memory) (ROM) 204 and random access memory (RAM) 205 form.Basic input/output (BIOS) 206 can be stored in ROM 204.System software 207, comprises operating system software 208, can be stored in RAM 205.Application software 210 also can be stored in RAM 205.
This system 200 can also comprise primary memory 211, as magnetic hard drive, and supplementary storage 212, as disc driver and CD drive.Computer executable instructions, data structure, program module and other data that driver and relevant computer-readable medium thereof are system 200 provide non-volatile memories.Software application can be stored in primary memory 211 and supplementary storage 212 and system storage 202.
Computing system 200 can in a network environment by network adapter 216 use one or more remote computer logic connect operate.
I/O (I/O) equipment 213 directly or by middle I/O controller can be coupled to system.User can by input equipment as keyboard, indicating equipment, or other input equipments (such as, microphone, operating rod, game mat, satellite antenna, scanner, etc.) input command and information is to system 200.Output device can comprise loudspeaker, printer, etc.Display 214 also by interface, as video adapter 215, is connected to system bus 203.
With reference to figure 3, the embodiment of the conforming method of the output that the maintenance code building application program that process flow diagram 300 shows description generates.
The file of file system or content can be used as input 301, are that the generation that will be updated exports in this input.Generator program as the target be updated exports, and may be to generate application program by the particular code based on certain master mould to generate.
The method is not limited to specific product.When certain source material (as model) is used to generate certain target material (as file), described method can be used.
302, generate output and can be confirmed as being the material that this particular code generates application program output, and be the material generated from source model.This determines by using the customizable rule of definition, to carry out reverse-engineering to carry out to the file of file system or content.Customizable rule can be provided as to export to infer what necessary information of master pattern one fixation based on the generation detected.
Such as, this determines that the file name pattern that can mate completely qualified (fully qualified) by the content of the file system scanned and mate performs.By limiting " completely qualified ", file instead of catalogue can be located.Such as, can be that a file being called "/a/b/c/d/file.java " finds a coupling, but, do not allow catalogue " a/b/c/d " (therefore yet impliedly comprising its content) to be mated.Reason is impossible know exactly in catalogue to be what (when not reading all files) on earth, thus also can not think that this catalogue itself and its all the elements all generate from certain specific source model for certain.Therefore, the method can work in Single document rank, therefore uses term " completely qualified ".
Scanning and coupling, can utilize embedded name asterisk wildcard.
Asterisk wildcard can be * character, such as Hello*World.This is initiated with Hello by any for coupling, terminates the character string (such as HelloThereWorld) for World.In described method, the asterisk wildcard provided can determine the value of the character string that asterisk wildcard is replaced.Therefore, the name of asterisk wildcard can be provided to identify them.In the above example, also Hello%WildCard1%World can be used.The name of this asterisk wildcard is " WildCard1 ", and why it is construed as asterisk wildcard, is because surrounded by character %.Matching algorithm can follow the tracks of the value of these asterisk wildcards.Such as, when mating HelloThereWorld, the value of " WildCard1 " is " There ".This provide match code (matching code) and for check match hit (hits) logic between separation easily.
Also complicated open (open-ended) asterisk wildcard coupling can be used, open asterisk wildcard coupling can across multiple file, such as C: %%whoknowswhere%% Wibble.txt can locate the file of Wibble.txt by name, and return as " whoknowswhere=myDir A B C someOtherDir " " whoknowswhere=myDir X the Y " value waited.
Can check and to conform to the extra instruction (directives) in rule, such as, check the existence of " signature " word or expression.
This can comprise the file checking inside, to confirm the existence of certain expection content.Such as, in response to the existence of the entity in the master pattern of " Alpha " by name, the file of AlphaBusinessObject.java by name can be produced.At same position, the file of BetaBusinessObject.jar by name may be run into.Why this file may exist, and be because once there was the object " Beta " of equivalence in master pattern, or this file is incoherent user file.Before including this file in Inference Model, the content of file can be checked, to check that it comprises generating content.Can for specific key word, character string, text block and the method can be guaranteed this file is generated and the mark deliberately generated, check.
According to generating the particular code exported and generate the relevant customizable rule of application program to generating, reverse-engineering 303 can be carried out to generation output, obtains the content of an Inference Model.This Inference Model be this specific generation application program generate this generation export based on the reverse-engineering model (reverse engineered model) of source model.This Inference Model can comprise the deduction source element (inferred source elements) of the naming variable of being located by the scanning of step 302 and matching process.
304, the content of Inference Model and the content of "current" model are compared, this "current" model is the latest edition of master pattern, and the program code of generation or resource generate application program by this particular code and generate from this source model.
In one embodiment, both content and structures of Inference Model all can be compared with the content and structure of "current" model, and may require that one is taken passages structure and content matching (extractstructural and content match).How to compare the semanteme depending on model itself.In another embodiment, Inference Model and "current" model may be comparable semantically, but have different structures.
305, any difference between the content of Inference Model and the content of "current" model can be detected.Such as, the source element that parsing (resolve) is inferred from the naming variable that scanning and matching process are located in "current" model (comprising any submodel part) is attempted.Any source element that can not resolve, all shows that its file be associated or local are redundancies, can by Automatic clearance.
Scanning and matching process can locating specific types model redundancy artifact (artifacts) (as rule define), but the material relevant with multiple different instances of the model of certain type may be found, and can identify which model is applicable to the artifact of which redundancy.
In the first embodiment of the method for description as shown in Figure 4, can use a kind of method of rule one by one, wherein, scanning document system finds out every rule, and creates Inference Model in internal memory, to allow to carry out the comparison to this rule.In the second embodiment, can be structured in internal memory and build whole model, then can execution model directly comparing model.
With reference to the process flow diagram 400 of Fig. 4, described the first embodiment determining to generate the method exporting and detect existence of redundant (components) is described.
401, reverse-engineering parts rule can be applied and be identified in file name pattern completely qualified in the input file of file system or content.
402, can the input file of scanning document system or content with the completely qualified filename defined in matched rule.
Once find the completely qualified filename of coupling, 403, carry out inferential information with the naming variable of location.404, can check whether mated file meets any extra instruction (directives) specified in rule, such as, the content of " signature ".
405, determine whether mated file is obviously that the generation generated by the specific generation application program customizing rule for it exports.If had a question, so 406, can be by mated file mark " unverified ", and in order to carry out the cleaning to this file, may manual confirmation be needed.
If the file mated is obviously generate to export, so 407, can infer that the naming variable from being located by scanning and matching process infers source element.408, the source element of deduction can be resolved as current source model.
Any source element of not resolving is all existence of redundant, 409 can from mated file Automatic clearance.
The method identification that following present use first embodiment generates the example of the rule exported.
(such as, the extend markup language (XML) of standard can be used) and specify that " shape " of completely qualified export file name is as follows:
<ruleString>％Project％/src/％％Package％Name％/entity/E％EntityExtension％Ext.java</ruleString>
This be in order to identify a top file being mapped to source " project ", the direct sub-folder of " src " by name, sub-folder structure that subsequently one is mapped to the indefinite length of the element of " PackageName " by name and last its filename indirect mappers be to the file of " entityextension " element.
Also can specify, the any file mating this pattern also must directly realize one (this pattern has been defined as Java file) in two specific classes, and comprise show that this file has been generated further certain arbitrarily " signature ".
<implements>com.ibm.common.IExtension|
com.ibm.base.IBaseExtension</implements>
<containsString>&lt；！--ExtendedObject--&gt；</containsString>
Finally, customized logic can be specified to the navigation of the source model carrying out Sum fanction and be correlated with.If the grammer of rule is not enough to describe some standard, can customized logic be used, user can be allowed to be hooked in framework by the code of oneself.
Customized logic, once be located, just can be used to assist according to case and navigate hereof.Such as, a file may comprise a series of similar entry contributed by the different elements in model.Each of these entries can be considered to one " coupling " (the multiple couplings namely in Single document), and this customized logic can assist the identification of each coupling.
This rear feature also allows arbitrary XML to be expanded the regular texture being incorporated into customized logic and can processing.
In order to carry out reverse-engineering to the content of file system, to infer that a) particular code generates the material of application program output; And hash b) representing redundancy, the subset of this material that therefore can be automatically removed, a kind of framework is proposed, this framework can process these types rule, process one group of basic XML instruction and entrust customized logic as required.
This framework can coupling on the file name pattern that first scanning document system looks is completely qualified.Be used herein embedded " name " asterisk wildcard (as shown above by being used by variable name % or %% symbol to be surrounded), it also brings the benefit in performance, because this technology can identify the irrelevant portions of file system fast, thus reduce scanning amount.
Adopt example pattern above, any top file not comprising the direct sub-folder of " src " by name produces coupling never, and process just directly can proceed to next top document folder.Equally, even if the name portion of the software package of this pattern has uncertain length, unless run into the file of " entity " by name, otherwise have no reason in the grading step scanning of this file.
Suppose the coupling of the complete qualified filename of discovery one, so this framework located the naming variable that (populate) is embedded in file name pattern.Use example above, such as file:
Can mate and infer following message:
Project＝MyProject
PackageName＝com/ibm/models
EntityExtension＝MyAddress
This framework can examine the file of coupling now to the compliance monitoring of the extra instruction may specified in rule, such as, examine the existence of the word or expression of " signature ", and whether certain Java file realizes and/or extends certain kinds.If it have passed all these examinations, so just there is rational determinacy: this generates (or comprising) to export.
When also not having ample evidence to prove that this file is generated (such as, " signature " may be lost, or the customization of user is attached to word " not " on "@generated " label be injected into have obvious sign to show), this framework marks this coupling for " unverified ", in order to clear up, need manual confirmation.
In this stage, this framework has one group of coupling certainly coming from particular code generation application program.Infer source element from the naming variable (seeing above) of being located by scanning and matching process now, and attempt to resolve these source elements in all applicable source models.Any source element that can not be resolved, all shows that the file of being correlated with or a part are wherein redundancies, can by Automatic clearance.In this fashion, this framework can guarantee that generating output always inputs consistent with source.
Described method and system can be used and use customizable regulation engine, analyze any file (java class, XML, text, etc.), can determine with very high degree of accuracy, whether code is generated by the application program of the code generator of particular type, and whether code is still correlated with.
Described method and system when not having explicit coupling, can obtain model information from the code conversed engineering generated, and not rely on special editing machine to keep both model and code aligned with each other.It also supports the customizable rule of applicable multiple different model code generating scene.
Described method and system, by using the elastic regulation of the critical aspects of the behavior of coded description maker, exports the input of inferring code generator from generation.
Can have a large amount of files in file system, all these files all must check for rules different in a large number, search coupling.Described method can accomplish that this point is to make this process integration in code building fast.
Described method also comprises for guaranteeing the only actual reformed mechanism of code generated.Specifically, the content of file or file should not only because it be similar and deleted to the content generated.
The present invention can take complete hardware embodiment, complete software implementation or comprise the form of embodiment of hardware and software element.In a preferred embodiment, the present invention is with software simulating, and it includes but not limited to firmware, resident software, microcode etc.
The present invention can take from computing machine can with or the form of the addressable computer program of computer-readable medium use or be connected with computing machine or any instruction execution system.For the object of this instructions, computing machine can with or computer-readable medium can be any can comprising, store, communication, propagate, or by or combined command executive system, the device of the program that device or equipment are combined.
This medium can be electronics, magnetic, light, electromagnetism, infrared ray or semiconductor system (or device or equipment) or propagation medium.The example of computer-readable medium comprises semiconductor or solid-state memory, tape, removable computer diskette, random access memory (RAM), ROM (read-only memory) (ROM), hard disc and CD.The present exemplary of CD comprises the CD of ROM (read-only memory) (CD-ROM), disc read/write (CD-R/W) and DVD.
Person of ordinary skill in the field knows, various aspects of the present invention can be implemented as system, method or computer program.Therefore, various aspects of the present invention can be implemented as following form, that is: hardware embodiment, completely Software Implementation (comprising firmware, resident software, microcode etc.) completely, or the embodiment that hardware and software aspect combines, " circuit ", " module " or " system " can be referred to as here.In addition, in certain embodiments, various aspects of the present invention can also be embodied as the form of the computer program in one or more computer-readable medium, comprise computer-readable program code in this computer-readable medium.
The combination in any of one or more computer-readable medium can be adopted.Computer-readable medium can be computer-readable signal media or computer-readable recording medium.Computer-readable recording medium such as may be-but not limited to-the system of electricity, magnetic, optical, electrical magnetic, infrared ray or semiconductor, device or device, or combination above arbitrarily.The example more specifically (non exhaustive list) of computer-readable recording medium comprises: the combination with the electrical connection of one or more wire, portable computer diskette, hard disk, random access memory (RAM), ROM (read-only memory) (ROM), erasable type programmable read only memory (EPROM or flash memory), optical fiber, Portable, compact dish ROM (read-only memory) (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate.In this document, computer-readable recording medium can be any comprising or stored program tangible medium, and this program can be used by instruction execution system, device or device or be combined with it.
The program code that computer-readable medium comprises can with any suitable medium transmission, comprises that---but being not limited to---is wireless, wired, optical cable, RF etc., or the combination of above-mentioned any appropriate.
The computer program code operated for performing the present invention can be write with the combination in any of one or more programming languages, described programming language comprises object oriented program language-such as Java, Smalltalk, C++ etc., also comprises conventional process type programming language-such as " C " language or similar programming language.Program code can fully perform on the user computer, partly perform on the user computer, as one, independently software package performs, partly part performs on the remote computer or performs on remote computer or server completely on the user computer.In the situation relating to remote computer, remote computer can by the network of any kind---comprise LAN (Local Area Network) (LAN) or wide area network (WAN)-be connected to subscriber computer, or, outer computer (such as utilizing ISP to pass through Internet connection) can be connected to.
Here the present invention is described with reference to according to the process flow diagram of the method for the embodiment of the present invention, device (system) and computer program and/or block diagram.Should be appreciated that the combination of each square frame in each square frame of process flow diagram and/or block diagram and process flow diagram and/or block diagram, can be realized by computer program instructions.These computer program instructions can be supplied to the processor of multi-purpose computer, special purpose computer or other programmable data treating apparatus, thus produce a kind of machine, make these computer program instructions when the processor by computing machine or other programmable data treating apparatus performs, create the device of the function/action specified in the one or more square frames in realization flow figure and/or block diagram.
Also can these computer program instructions be stored in computer-readable medium, these instructions make computing machine, other programmable data treating apparatus or other equipment work in a specific way, thus the instruction be stored in computer-readable medium just produces the manufacture (article ofmanufacture) of the instruction of the function/action specified in the one or more square frames comprised in realization flow figure and/or block diagram.
This computer program instructions can also be loaded into computing machine, other programmable data processing device or other device, making will at computing machine, the sequence of operations step that other programmable device or other equipment perform, to produce computer implemented process, makes the instruction performed on computing machine or other programmable device be provided for realizing the process of the function/action of specifying in the block of process flow diagram and/or block diagram or multiple pieces.
Process flow diagram in accompanying drawing and block diagram show system according to multiple embodiment of the present invention, the architectural framework in the cards of method and computer program product, function and operation.In this, each square frame in process flow diagram or block diagram can represent a part for module, program segment or a code, and a part for described module, program segment or code comprises one or more executable instruction for realizing the logic function specified.Also it should be noted that at some as in the realization of replacing, the function marked in square frame also can be different from occurring in sequence of marking in accompanying drawing.Such as, in fact two continuous print square frames can perform substantially concurrently, and they also can perform by contrary order sometimes, and this determines according to involved function.Also it should be noted that, the combination of the square frame in each square frame in block diagram and/or process flow diagram and block diagram and/or process flow diagram, can realize by the special hardware based system of the function put rules into practice or action, or can realize with the combination of specialized hardware and computer instruction.
In the case without departing from the scope of the present invention, openly can improve and revise above-mentioned.
1. a computer implemented method for safeguarding the integrality that code generator exports, comprising:
Determine that the generation generated based on master pattern by particular code generation application program exports;
Analyze the described content generating the deduction version exported to infer master pattern;
The deduction version of described master pattern and the current version of master pattern are compared, with the difference of detection resources element; And
The difference detected is used to determine to generate the redundant elements in exporting described.
2. method according to claim 1, wherein determine that generating output comprises:
The file of input file system or content and application generate the operation of application program customizable rule based on particular code is carried out reverse-engineering to identify generating and is exported.
3. method according to claim 1 and 2, wherein analyze described generation output and comprise with the content of the deduction version of inferring master pattern:
Application is exported to described generation and carries out reverse-engineering based on the customizable rule of the operation to described particular code generator program.
4. according to the method in claim 2 or 3, wherein said customizable rule generates application program for naming and/or the rule of content of master pattern according to particular code.
5., according to the method one of claim 2 to 4 Suo Shu, wherein said customizable rule comprises the baseset of instruction and entrusts to customized logic as required.
6. according to the method one of claim 2 to 5 Suo Shu, wherein the file of scanning document system or content are found out and the mating of the file name pattern defined in described customizable rule, wherein said file name pattern is completely qualified file name pattern, and this filename of position matching does not still allow the file mating catalogue.
7. method according to claim 6, the file name pattern wherein defined comprises embedded name asterisk wildcard.
8. the method according to claim 6 or 7, wherein said scanning comprises and checks whether the filename that matches conforms to one or more extra instruction of specifying in described customizable rule, the signature contents that the content that wherein extra instruction comprises expecting is form.
9., according to the method one of claim 6 to 8 Suo Shu, wherein use the file name pattern with the coupling of the naming variable of location to infer the source element of the deduction version of described master pattern.
10. according to one of any described method of aforementioned claim, wherein the described deduction version of described master pattern and the current version of described master pattern are compared, with the difference of detection resources element, comprise and the described content of the content of the deduction version of described master pattern and the current version of described master pattern is compared.
11. methods according to claim 10, comparison wherein comprises: compared by the content and structure of the content and structure of the deduction version of described master pattern and the current version of described master pattern.
12. according to one of any described method of aforementioned claim, wherein the described deduction version of described master pattern and the current version of described master pattern are compared, with the difference of detection resources element, comprise a kind of mode of rule one by one, wherein, scan-data to find out every rule, and partly creates described Inference Model in memory to allow to carry out the comparison to this rule.
13. according to the method one of claim 1 to 11 Suo Shu, wherein the described deduction version of described master pattern and the current version of described master pattern are compared, with the difference of detection resources element, comprise the whole deduction version and execution model directly comparing model that build described master pattern in memory.
14., according to one of any described method of aforementioned claim, comprising: automatically filing or deleting identify described generates the redundant elements exported.
15. 1 kinds, for safeguarding the system of the integrality that code generator exports, comprising:
Generate and export identification component, for determining that the generation generated based on master pattern by particular code generation application program exports;
Inference Model generating unit, for analyzing the described content generating the deduction version exported to infer master pattern;
Comparing unit, for comparing the deduction version of described master pattern and the current version of master pattern, with the difference of detection resources element; And
Cleaning member, determines for using the difference detected to generate the redundant elements in exporting described.
16. systems according to claim 15, wherein said generation exports identification component and determines that generating output comprises:
17. systems according to claim 15 or 16, wherein Inference Model generating unit exports comprise with the content of the deduction version of inferring master pattern for analyzing described generation: apply described generations output and carry out reverse-engineering based on the customizable rule of the operation to described particular code generator program.
18. systems according to claim 17, wherein said customizable rule generates application program for naming and/or the rule of content of master pattern according to particular code.
19. systems according to claim 17 or 18, wherein said generation exports identification component and also finds out and the mating of the file name pattern defined in described customizable rule for the file of scanning document system or content, wherein said file name pattern is completely qualified file name pattern, and this filename of position matching does not still allow the file mating catalogue.
20. systems according to claim 19, the file name pattern wherein defined comprises embedded name asterisk wildcard.
21. methods according to claim 19 or 20, wherein export identification component in described generation, described scanning comprises and checks whether the filename that matches conforms to one or more extra instruction of specifying in described customizable rule, the signature contents that the content that wherein extra instruction comprises expecting is form.
22. according to the system one of claim 19 to 21 Suo Shu, wherein exports identification component in described generation, uses the file name pattern with the coupling of the naming variable of location to infer the source element of the deduction version of described master pattern.
23. according to the method one of claim 15-20 Suo Shu, wherein also generates for automatically filing or deleting identify described the redundant elements exported at described cleaning member.
24. 1 kinds for safeguarding the computer program of the integrality that code generator exports, described computer program comprises: the computer-readable recording medium of the instruction fetch of can be processed circuit and storage, is performed the method performed according to one of claim 1-14 by described treatment circuit.
25. are stored in computer-readable recording medium and can be loaded into the computer program of digital machine internal memory, comprise software code partition, when said program is run on, perform the method according to one of claim 1-14.
26. 1 kinds of methods are in essence described by reference accompanying drawing.
In 27. 1 kinds of system natures described by reference accompanying drawing.
CN201380054687.0A 2012-10-23 2013-06-12 For the method and system for the integrality for safeguarding code generator output CN104737125B (en)
PCT/IB2013/054818 WO2014064545A1 (en) 2012-10-23 2013-06-12 Maintaining integrity of output of code generators
CN104737125A true CN104737125A (en) 2015-06-24
CN104737125B CN104737125B (en) 2018-03-06
CN201380054687.0A CN104737125B (en) 2012-10-23 2013-06-12 For the method and system for the integrality for safeguarding code generator output
CN1346466A (en) * 1998-12-22 2002-04-24 电脑联合想象公司 Method and apparatus for executing PL/SQL stored code objects in database
CN1382280A (en) * 1999-02-05 2002-11-27 坦斯利卡公司 Automatic processor generation system and method for designing configurable processor
US7856621B2 (en) 2004-05-19 2010-12-21 International Business Machines Corporation Method for synchronization of concurrently modified interdependent semi-derived artifacts
JP2007538321A (en) * 2004-05-20 2007-12-27 コード バリー ピーティーワイ リィミティッド Code generation method
US9354870B2 (en) 2016-05-31
Amstutz et al. 2016 Common workflow language, v1. 0
CN102902529B (en) 2017-04-12 Method and system for managing data source
Bichsel et al. 2016 Statistical deobfuscation of android applications
JP6198939B2 (en) 2017-09-20 Method for loading driver and embedded device
US9449278B2 (en) 2016-09-20 Cloud-based diagnostics and remediation
Fowkes et al. 2016 Parameter-free probabilistic API mining across GitHub
JP5783630B2 (en) 2015-09-24 Digital signature on composite resource document
JP5398824B2 (en) 2014-01-29 Using temporary PCR to achieve reliability in the application space of secure processing systems
US9830460B2 (en) 2017-11-28 Techniques for correlating vulnerabilities across an evolving codebase
Lamprecht et al. 2011 Semantics-based composition of EMBOSS services