CN106383734A - Method for extracting detailed design from codes - Google Patents

Method for extracting detailed design from codes Download PDF

Info

Publication number
CN106383734A
CN106383734A CN201610945429.7A CN201610945429A CN106383734A CN 106383734 A CN106383734 A CN 106383734A CN 201610945429 A CN201610945429 A CN 201610945429A CN 106383734 A CN106383734 A CN 106383734A
Authority
CN
China
Prior art keywords
detailed design
coding
engineering
function
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610945429.7A
Other languages
Chinese (zh)
Inventor
程胜
朱海涛
周超超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co Ltd
Original Assignee
BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co Ltd filed Critical BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co Ltd
Priority to CN201610945429.7A priority Critical patent/CN106383734A/en
Publication of CN106383734A publication Critical patent/CN106383734A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • G06F8/4434Reducing the memory space required by the program code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation

Abstract

The invention belongs to the field of software engineering, and in particular relates to a method for extracting detailed design from codes. The method for extracting the detailed design from the codes comprises the following steps of (1) building a coding project; (2) building a directory structure, a coding file, a function and a global variable corresponding to the coding project; and (3) judging whether the detailed design is completed, if the detailed design is not completed, turning to the step (2), and if the detailed design is completed, automatically generating a detailed design file.

Description

A kind of method extracting detailed design from code
Technical field
The invention belongs to field of software engineering and in particular to a kind of from code extract detailed design method.
Background technology
Traditional software systems detailed design mainly adopts structural program design method, and its core content includes: Module interface design, the design of perdurable data structure design, core algorithm, the attribute of core classes, method design, data flow, control System stream and Business Stream design.As above design for meeting, conventional design tool has:Visio flow chart, class figure, database design Figure, PAD problem analysis diagram, N-S flow chart and PDL pseudo-code design language.
Based on as above design tool, disclosure satisfy that the Basic Design demand of detailed design phase.But in coding stage meeting One serious problems occurs:Detailed design and coding realize inconsistent problem.
Because the factor of the aspects such as system complexity, module coupling degree and detailed design personnel ability's level is it will usually go out Coding finds that detailed design has a lot of problems when realizing now.And at this moment developer is often unwilling to go to repair for convenience again Change detailed design (if developer is different with detailed design personnel, flow process may more bother), this is easy for causing in detail Design and encode the inconsistent of realization.And with the modification of follow-up system demand, flow of personnel is changed, and developer is more reluctant The inconsistent problem that meaning synchronous vacations design, detailed design and coding are realized can be increasingly severe.
Inconsistent problem is realized based on detailed design and coding, has Mode-driven architecture (MDD Model- at present Driven Development) method for designing, its core is to visualize the integrally-built modeling of figure interface completion system, so (software configuration such as class, function, global variable does not comprise tool corresponding coding realization can be automatically converted into based on system model afterwards Body is realized).If the problems in the design, model can be changed and regenerate code to reach detailed design and to encode realization Uniformity, but the problem that Mode-driven architecture there is also:If system design is problematic or demand changes, need To regenerate code structure to after system modelling modification again.Which can avoid encoding the design realizing early stage and realize not Unanimously, the problems such as work repeats, but for included system which implementing just improper that is to say, that MDO It is not suitable for system later maintenance.Therefore this kind mode finally will also result in the inconsistence problems that detailed design is realized with coding.
Content of the invention
Goal of the invention:The present invention is directed to the problem that above-mentioned prior art exists and makes improvement, that is, the invention discloses a kind of The method extracting detailed design from code.
Technical scheme:A kind of method extracting detailed design from code, comprises the following steps:
(1) create coding engineering;
(2) the coding corresponding bibliographic structure of engineering, coding file, function and global variable are created;
(21) create the coding corresponding bibliographic structure of engineering;
(22) create coding engineering to encode file accordingly and directly write detailed design as annotations;
(23) create the coding corresponding function of engineering and directly write detailed design as annotations;
(24) create the coding corresponding global variable of engineering and directly write detailed design as annotations;
(3) judging whether detailed design completes, if not completing, proceeding to step (2), if completing, automatically producing in detail Thin design documentation.
Further, coding engineering encodes file accordingly and includes being labeled as detailed design in step (22), and specifies and work as Coding file cited in front coding file adds corresponding detailed design explanation simultaneously.
Further, in step (23), the coding corresponding function of engineering includes being labeled as detailed design, and specifies current letter Several called functions, and specify the global variable cited in current function, and add corresponding detailed design explanation, and add Corresponding business process map.
Further, in step (24), the coding corresponding global variable of engineering includes being labeled as detailed design, and adds phase The detailed design explanation answered.
Beneficial effect:A kind of method extracting detailed design from code disclosed by the invention has the advantages that:
Developer needs not rely on detailed design document, based on detailed design create engineering, coding file, function and Global variable can directly carry out coding and realize, and can complete specifically to encode realization according to annotation;
In the case of not changing annotation, developer arbitrarily can be carried out to coding filename, function name, global variable name Change and do not affect detailed design overall structure;
If developer increases coding file, function, global variable, code analysis instrument meeting automatic detection simultaneously is pointed out to hold The personnel of sending out increase corresponding detailed design annotation;
If deleting the coding file comprising detailed design annotation, function, global variable, code analysis instrument can be examined automatically Survey coding file, function, the dependence of global variable, if deleted coding file, function, global variable have been cited Or call, then point out developer;
For the change of follow-up system demand, the corresponding file of direct modification, function, global variable annotate, and can be real When automatically generate detailed design document;
As described above, this method for designing not there is a problem of detailed design and coding realize inconsistent.
Brief description
Fig. 1 is a kind of flow chart of method extracting detailed design from code disclosed by the invention.
Specific embodiment:
Below the specific embodiment of the present invention is described in detail.
As shown in figure 1, a kind of method extracting detailed design from code, comprise the following steps:
(1) create coding engineering;
(2) the coding corresponding bibliographic structure of engineering, coding file, function and global variable are created;
(21) create the coding corresponding bibliographic structure of engineering;
(22) create coding engineering to encode file accordingly and directly write detailed design as annotations;
(23) create the coding corresponding function of engineering and directly write detailed design as annotations;
(24) create the coding corresponding global variable of engineering and directly write detailed design as annotations;
(3) judging whether detailed design completes, if not completing, proceeding to step (2), if completing, automatically producing in detail Thin design documentation.
Further, coding engineering encodes file accordingly and includes being labeled as detailed design in step (22), and specifies and work as Coding file cited in front coding file adds corresponding detailed design explanation simultaneously.
Further, in step (23), the coding corresponding function of engineering includes being labeled as detailed design, and specifies current letter Several called functions, and specify the global variable cited in current function, and add corresponding detailed design explanation, and add Corresponding business process map.
Further, in step (24), the coding corresponding global variable of engineering includes being labeled as detailed design, and adds phase The detailed design explanation answered.
It is as follows that detailed design annotation writes specification:
Annotation writes the basis that specification is that code parses automatically and detailed design document automatically generates, this patent clear stipulaties Coding file, function, global variable corresponding detailed design annotation write specification, as follows:
Coding file
/**
*@detailDesignId=[xxx]
*@dependFileIds=[xxx, xxx, xxx]
*@detailDesc=[xxxx]
*/
Function
/**
*@detailDesignId=[xxx]
*@callFuncIds=[xxx, xxx, xxx]
*@callGlobalVariableIds=[xxx, xxx, xxx]
*@detailDesc=[xxxx]
*@detailFlowGraphPath=[xxxx]
*/
Global variable
/**
*@detailDesignId=[xxx]
*@detailDesc=[xxxx]
*/
Detailed design comment graphics editing machine
Detailed design personnel can write detailed design annotation manually, but writes more complicated manually.Therefore, this patent provides Graphic editor based on coding file.Compared to compiling the notes manually, this graphic editor has following advantage:
Detailed design mark is distributed automatically;
The file of dependence, function, global variable dynamic retrieval;
Eliminate annotation compiling form Problem-Error.
Code analysis and detailed design document Auto-Generation Tool
According to detailed design annotation, code analysis and detailed design document Auto-Generation Tool can parse corresponding literary composition Structural relation between part, function, global variable and annotation, and do following inspection before deriving document:
With the presence or absence of the coding file not marked by detailed design, function, global variable;
Cited in annotation, the file that calls, function, global variable whether there is.
Check by afterwards, automatically generate detailed design document, detailed design document comprises following content:
Overall system architecture figure and detailed description;
Coding file call graph and detailed description;
Function call relationship graph, detailed description and corresponding Business Stream design drawing;
Global variable reference graph of a relation and detailed description.
Above embodiments of the present invention are elaborated.But the present invention is not limited to above-mentioned embodiment, In the ken that art those of ordinary skill possesses, can also do on the premise of without departing from present inventive concept Go out various change.

Claims (4)

1. a kind of method of detailed design of extracting from code is it is characterised in that comprise the following steps:
(1) create coding engineering;
(2) the coding corresponding bibliographic structure of engineering, coding file, function and global variable are created;
(21) create the coding corresponding bibliographic structure of engineering;
(22) create coding engineering to encode file accordingly and directly write detailed design as annotations;
(23) create the coding corresponding function of engineering and directly write detailed design as annotations;
(24) create the coding corresponding global variable of engineering and directly write detailed design as annotations;
(3) judging whether detailed design completes, if not completing, proceeding to step (2), if completing, production automatically sets in detail Meter document.
2. a kind of method of detailed design of extracting from code according to claim 1 is it is characterised in that in step (22) Coding engineering encodes file accordingly and includes being labeled as detailed design, and specifies the coding file cited in present encoding file same Shi Tianjia corresponding detailed design explanation.
3. a kind of method of detailed design of extracting from code according to claim 1 is it is characterised in that in step (23) The coding corresponding function of engineering includes being labeled as detailed design, and the function that specified current function is called, and specifies current letter The cited global variable of number, and add corresponding detailed design explanation, and add corresponding business process map.
4. a kind of method of detailed design of extracting from code according to claim 1 is it is characterised in that in step (24) The coding corresponding global variable of engineering includes being labeled as detailed design, and adds corresponding detailed design explanation.
CN201610945429.7A 2016-11-02 2016-11-02 Method for extracting detailed design from codes Pending CN106383734A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610945429.7A CN106383734A (en) 2016-11-02 2016-11-02 Method for extracting detailed design from codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610945429.7A CN106383734A (en) 2016-11-02 2016-11-02 Method for extracting detailed design from codes

Publications (1)

Publication Number Publication Date
CN106383734A true CN106383734A (en) 2017-02-08

Family

ID=57957113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610945429.7A Pending CN106383734A (en) 2016-11-02 2016-11-02 Method for extracting detailed design from codes

Country Status (1)

Country Link
CN (1) CN106383734A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107256160A (en) * 2017-06-12 2017-10-17 郑州云海信息技术有限公司 A kind of code document generation method in continuous integrating, apparatus and system
CN110347370A (en) * 2018-04-03 2019-10-18 鼎捷软件股份有限公司 Scheme integrates with system and method
CN111580803A (en) * 2019-02-15 2020-08-25 广州汽车集团股份有限公司 Method and system for generating flow chart with suspension prompt, electronic device and medium
WO2021169032A1 (en) * 2020-02-27 2021-09-02 杭州群核信息技术有限公司 Home parametric model building system and method based on global variables

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495832A (en) * 2011-12-12 2012-06-13 方正国际软件有限公司 System for automatically generating document in software development process
CN103336760A (en) * 2013-07-11 2013-10-02 北京信息科技大学 Method and device based on reverse engineering for automatically generating software documents
CN103488460A (en) * 2013-09-04 2014-01-01 用友软件股份有限公司 System and method for automatically marking source code

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495832A (en) * 2011-12-12 2012-06-13 方正国际软件有限公司 System for automatically generating document in software development process
CN103336760A (en) * 2013-07-11 2013-10-02 北京信息科技大学 Method and device based on reverse engineering for automatically generating software documents
CN103488460A (en) * 2013-09-04 2014-01-01 用友软件股份有限公司 System and method for automatically marking source code

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107256160A (en) * 2017-06-12 2017-10-17 郑州云海信息技术有限公司 A kind of code document generation method in continuous integrating, apparatus and system
CN110347370A (en) * 2018-04-03 2019-10-18 鼎捷软件股份有限公司 Scheme integrates with system and method
CN111580803A (en) * 2019-02-15 2020-08-25 广州汽车集团股份有限公司 Method and system for generating flow chart with suspension prompt, electronic device and medium
CN111580803B (en) * 2019-02-15 2022-09-06 广汽埃安新能源汽车有限公司 Method and system for generating flow chart with suspension prompt, electronic device and medium
WO2021169032A1 (en) * 2020-02-27 2021-09-02 杭州群核信息技术有限公司 Home parametric model building system and method based on global variables

Similar Documents

Publication Publication Date Title
CN110764753B (en) Business logic code generation method, device, equipment and storage medium
Kuchaiev et al. Nemo: a toolkit for building ai applications using neural modules
CN109739766B (en) System and method for rapidly building FPGA digital simulation model
CN109783079A (en) A kind of code annotation generation method based on program analysis and Recognition with Recurrent Neural Network
US8051410B2 (en) Apparatus for migration and conversion of software code from any source platform to any target platform
CN111488145B (en) Micro-service code generation system and method based on service domain data model library
CN104317589B (en) A kind of code automatic generation method and device for being used to load dynamic link library
CN106383734A (en) Method for extracting detailed design from codes
CN104331285A (en) Automatic code generation method and system
CN104731588B (en) Page layout document generating method and page layout file creating apparatus
CN105528418A (en) Design document generation method and apparatus
CN105183476B (en) A kind of construction method and device of cross-platform program
CN106126564A (en) A kind of method rendered based on dynamic template language
CN106709985A (en) Generation method and device for virtual three-dimensional sacrifice scene
CN110442514B (en) Method for realizing defect repair recommendation based on learning algorithm
CN111124380A (en) Front-end code generation method
CN106779582A (en) A kind of TWS flows collocation method and device
CN104899042A (en) Embedded machine vision inspection program development method and system
CN106033338A (en) Method and device for importing and analyzing source code based on FOG data
CN110334001A (en) A kind of method and apparatus that batch automatically generates echo test
CN109471637A (en) The examination script debugging method of circuit diagram
CN108829968A (en) Circuit diagram checking method based on Python spread function
CN105354144A (en) Method and system for automatically testing consistency of business support system information models
CN106874014A (en) The three layer identification code generation methods based on model and framework
CN112948947A (en) BIM-based gravity dam structure design compliance inspection method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170208