CN100507843C - Dynamic programing method - Google Patents

Dynamic programing method Download PDF

Info

Publication number
CN100507843C
CN100507843C CNB2007100907305A CN200710090730A CN100507843C CN 100507843 C CN100507843 C CN 100507843C CN B2007100907305 A CNB2007100907305 A CN B2007100907305A CN 200710090730 A CN200710090730 A CN 200710090730A CN 100507843 C CN100507843 C CN 100507843C
Authority
CN
China
Prior art keywords
program
institutional framework
module
internal memory
call
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.)
Expired - Fee Related
Application number
CNB2007100907305A
Other languages
Chinese (zh)
Other versions
CN101021792A (en
Inventor
杨力祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CNB2007100907305A priority Critical patent/CN100507843C/en
Publication of CN101021792A publication Critical patent/CN101021792A/en
Application granted granted Critical
Publication of CN100507843C publication Critical patent/CN100507843C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention discloses a dynamic programming method. The user can construct the program by the foreground IDE integrate develop environment and construct an internal memory structure corresponding to the program dynamically at the same time in background internal memory; the internal memory structure includes three types, that are organize structure, invoke terminal port and function module; the organize structure includes the affiliation among the modules in source program and the addresses of the modules; the invoke terminal port includes the invoke relation among the modules in the source program; the function module only includes relevant codes for data processing. The invention realizes the on line dynamic modify for the program, integrates the edit, compile, debug, modify and run for the program, and allows the program to be modified during running process (namely not quit from internal memory) and to be run after modification directly, and also can solely modify and debug one module during the running process of the program.

Description

A kind of dynamic programing method
Technical field
The present invention relates to the computer program programmed method of computer realm, relate in particular to a kind ofly can dynamically generate, update routine and can be in program appointed positions begin executive routine, finish the method for executive routine.
Background technology
Along with developing rapidly of computing machine, various computer programming languages also arise at the historic moment.Existing computer programming language is varied, but the method that generates computer executable program by computerese is identical substantially: at first with a text editor as user's operating platform, grammer according to certain certain computer language generates several computer source program files, through a program compiler these several source files of program are compiled into several executable computer object files (being the obj file) again, at last by a chain program with these file destinations and the file destination (normally library file) of generation in advance, be assembled into a complete executable file (being the exe file).In whole process, the All Files that relates to all is stored on the hard disk of computing machine, and all is in non-executing state.When the needs executive routine, executable file (exe file) graftabl is carried out again by operating system.So when program was in by editing mode, program itself can not be performed.Update routine at first will withdraw from program from executing state if desired, makes amendment again, even the execution of shut down procedure is also wanted in a bit small change, re-executes after compiling again.Generally speaking, existing program can not be performed in editor, can not be modified in the process of carrying out equally.
In addition, in the active computer programming language, also there is such common trait, function according to program module is divided, usually can be divided into the execution module (as the printf function of C language) that is used for concrete data processing, and the call relation module (in the C language, showing as the main function) that embodies LCP to calling mutually between other function calls and other function.These two kinds of structures in internal memory be close-coupled together, so comprise execution module and call relation module in the executable code simultaneously, they merge mutually, call mutually, and calling program can't be made amendment to some modules wherein under executing state or replace.Its reason is, if some modules are made amendment or are replaced, a kind of may be change to the logical organization of whole procedure, will involve modification like this to other module, such as revising or replace a module, will make amendment to other call address of calling in the module of this module, and this location revision normally lies in the calling module, be indefinite, under the prior art condition, almost can't find; Another kind may be modification or the replacement to a module, may cause the change of this module committed memory space size, in case the size in committed memory space changes, just may cover the code or the data of other module, causes the collapse of this program.
In addition, existing computer programming language usually can't to one independently module (as the function in the C language) carry out independent debugging and test, often will by other function or add therein program statement could realize the debugging, make the debugging of calling program become very difficult like this, under function or the various complicated situation of structure, can't quick and accurate problem identificatioin function or structure on earth at which.
Summary of the invention
The present invention aims to provide a kind of dynamic programing method, can dynamically generate, update routine and can be in program appointed positions begin executive routine, finish the method for executive routine.
Dynamic programing method of the present invention is that logical organization is separated fully with functional structure, is divided into different parts in internal memory.The user is by foreground IDE Integrated Development Environment construction procedures, and in the process, IDE synchronous dynamic in background memory is set up the internal storage structure corresponding with it therewith; Described internal storage structure comprises three types, promptly institutional framework, call port and functional module; The data processing correlation function is not wherein contained in the address that comprises the subordinate relation and the described module of intermodule in the source program in the described institutional framework; Describedly call the call relation that port comprises intermodule in the source program, wherein do not contain the data processing correlation function; Described functional module includes only the data processing correlative code, does not comprise the subordinate relation of intermodule and the description of call relation.
Subordinate relation in the described institutional framework between the module comprises subordinate, comprise and side by side.
The described port that calls can calling functional modules, also can jump to another one and call port.
Compared with prior art, the invention has the beneficial effects as follows:
1. the present invention has realized that the online of program on-the-fly modifies, and the great significance to the artificial intelligence in future makes artificial intelligence become possibility in data, code full-scope simulation intelligence;
2. the present invention can satisfy the debugging maintenance requirement that a lot of important requirements can not be shut down the system program of maintenance, with editor, compiling, debugging, the modification of program, move this plurality of processes and be incorporated into together, the permission program (does not promptly withdraw from internal memory) and makes amendment in operational process, revise the back and directly move, can also carry out repeatedly modification again, rerun;
3. the present invention has realized that program makes amendment to some modules wherein separately and debug in operational process, and is flexibly quick.
Description of drawings
Fig. 1 is a dynamic synchronization creation procedure synoptic diagram of the present invention;
Fig. 2 is that the present invention on-the-fly modifies the program synoptic diagram;
Fig. 3 is that the present invention subtracts the mechanism principle synoptic diagram.
Embodiment
Now reaching embodiment in conjunction with the accompanying drawings is described in further detail the present invention.
Pass through in the process of computer programming language generator program existing, all be to be independent of compilation process coding source code by the programmer by the IDE interface earlier, these program source codes form independently text, from the text of program source code, read source program by independent program compiler again, change source program into executable file.In this whole process, in internal memory, generate without any executable internal storage structure.
And according to method of the present invention, IDE in the source program that the programmer generates, the executable internal storage structure of formation logic isomorphism in internal memory of synchronous dynamic.Because the institutional framework in the internal memory, call structure, functional module is relatively independent, allows to generate internal storage structure with random order, also can add, delete internal storage structure dynamically according to programmer's requirement.Fig. 1 is a dynamic synchronization creation procedure synoptic diagram of the present invention.With reference to figure 1 (A), at first the programmer creates object A by IDE interface, foreground 101, generates institutional framework A synchronously in the IDE control background memory 102, wherein comprises the content of expressing the hypotaxis relation, i.e. relation of inclusion and coordination.Further with reference to figure 1 (B), the programmer adds two object B and C with object A expansion, then in internal memory 102, also generate institutional framework B and C synchronously, and according to the subordinate relation between they and the A, be expressed as A and comprise B, B and C are arranged side by side, and the while, A also comprised C.So just realized that source program and executable internal storage structure generate synchronously.
According to existing technique of compiling, if the mistake in the discovery procedure or relative program are made amendment in the program implementation process, even be small change, also can only withdraw from executing state earlier, revise the text of source program again, compile again then, reinstall execution.In real productive life,, withdraw from execution and just mean enormous economic loss a lot of important system programs.
And according to method of the present invention, because its internal storage structure is relatively separately independently, the program that allows independently to carry out separately in the program implementation process is added, deletes and is revised.When finding that some functional modules are wrong in the discovery procedure during such as operation, just can in internal memory, rebulid a new correct functional module that can substitute this wrong functional module, utilize on-line debugging function of the present invention then, this new functional module debugging is correct, the call address that resets the port that calls original error module again is new functional module, and leave out original error functional module, so just under the state that program keeps moving, finished the modification of program.
Fig. 2 is that the present invention on-the-fly modifies the program synoptic diagram.With reference to figure 2 (A), institutional framework C comprises institutional framework D, institutional framework C with call port E and interrelate, institutional framework D with call port F and interrelate, call port E simultaneously and call port F, call port F call function (functional module) G again, after function G is finished, return call it call port F.In program operation process, if find that there is mistake in function G, want to make amendment, then with reference to figure 2 (B), set up the correct function that can realize expectation function (functional module) H.With reference to figure 2 (C), the pointer that calls port F is pushed function H, carry out function H, execution is returned and is called port F after finishing.Can be with original function G deletion.So just finished on-the-fly modifying to program.
Adopt similar method, also can carry out onlinely on-the-fly modifying the subordinate relation of institutional framework or the call relation that calls port.
It is exactly " subtracting mechanism " that the present invention also has characteristics.In existing object-oriented programming (as C Plus Plus), can from a base class (as a class), derive from a subclass (as the b class), the total data and the code that comprise a class in this b class, just the data of a class and b class and code are simple linear growths, be called and add mechanism, thisly add the recycling rate of waterused that mechanism has improved code, reduce and repeat work and redundant code, make calling program more simple and direct.But thisly can only increase the method that can not reduce as required, also have significant limitation by inheriting.And the present invention has realized adding the flexible change that can subtract.
Fig. 3 is that the present invention subtracts the mechanism principle synoptic diagram.With reference to figure 3 (A), the original institutional framework of the program in the internal memory is shown in figure (A), and institutional framework I comprises institutional framework J, and institutional framework J has the K of comprising, and institutional framework L and J are arranged side by side simultaneously.Amended institutional framework has kept original institutional framework I and institutional framework J in the internal memory shown in figure (B), and institutional framework I comprises institutional framework J, has deducted original institutional framework K and institutional framework L, has added new institutional framework M, N and O; Institutional framework J comprises institutional framework M, and institutional framework J and institutional framework N and institutional framework O are arranged side by side.This shows, deducted unwanted institutional framework K and L in the new program, increased M, N and O, realized that adding of program can subtract.
Under the prior art condition, technique of compiling can't be debugged separately the part of a functional module or a program in addition, must add the code that some are auxiliary, forms an exe file, the system debug of just packing into then.
The present invention allows the institutional framework of independent creation facilities program (CFP) in the internal memory and the functional module of program in the process of carrying out.Order and the scale set up can have bigger degree of freedom, only otherwise overflowing internal memory gets final product.After the input of the part of the functional module of program or a program was finished, the programmer just can order IP to jump to the port of appointment in the internal memory, and program just can on-line debugging.With respect to existing debugging technique, what the programmer will do is exactly the entrance and exit of specifying the program that needs debugging, reaches initialization running status in the initialization instrument at IDE interface.
The above embodiment only is the preferred embodiments of the present invention; the invention is not restricted to the foregoing description; for persons skilled in the art; the any conspicuous change of under the prerequisite that does not deviate from materials used of the present invention, process choice and installation principle it being done all belongs to the protection domain of design of the present invention and claims.

Claims (3)

1. dynamic programing method is characterized in that: the user is by foreground IDE Integrated Development Environment construction procedures, and in the process, IDE synchronous dynamic in background memory is set up the internal storage structure corresponding with it therewith; Described internal storage structure comprises three types, promptly institutional framework, call port and functional module; The address that comprises the subordinate relation and the described module of intermodule in the source program in the described institutional framework; Describedly call the call relation that port comprises intermodule in the source program; Described functional module includes only the data processing correlative code.
2. dynamic programing method according to claim 1 is characterized in that: the subordinate relation in the described institutional framework between the module comprises subordinate, comprise and side by side.
3. dynamic programing method according to claim 1 is characterized in that: the described port that calls can calling functional modules, also can jump to another one and call port.
CNB2007100907305A 2007-04-05 2007-04-05 Dynamic programing method Expired - Fee Related CN100507843C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100907305A CN100507843C (en) 2007-04-05 2007-04-05 Dynamic programing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100907305A CN100507843C (en) 2007-04-05 2007-04-05 Dynamic programing method

Publications (2)

Publication Number Publication Date
CN101021792A CN101021792A (en) 2007-08-22
CN100507843C true CN100507843C (en) 2009-07-01

Family

ID=38709567

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100907305A Expired - Fee Related CN100507843C (en) 2007-04-05 2007-04-05 Dynamic programing method

Country Status (1)

Country Link
CN (1) CN100507843C (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727345B (en) * 2008-10-29 2013-09-04 国际商业机器公司 Method and system for controlling loading state of dynamic link library DLL
CN105302623A (en) * 2014-07-28 2016-02-03 中兴通讯股份有限公司 Compiling method, control method, running method and device
CN106250124B (en) * 2016-07-25 2020-01-21 百富计算机技术(深圳)有限公司 Method and device for realizing cross-platform operation of functional modules
CN106802806B (en) * 2017-01-17 2021-01-15 泰康保险集团股份有限公司 Method and apparatus for integrating software development environments
CN110598412B (en) * 2018-06-12 2021-12-14 杨力祥 Method and computing device for isolating power information and checking power based on power information
CN112604296B (en) * 2020-12-30 2024-01-26 深圳市创梦天地科技有限公司 Game updating method, electronic equipment and related system

Also Published As

Publication number Publication date
CN101021792A (en) 2007-08-22

Similar Documents

Publication Publication Date Title
Felleisen et al. A programmable programming language
Biehl Literature study on model transformations
US5170465A (en) Incremental-scanning compiler for source-code development system
Renggli et al. Embedding languages without breaking tools
Padgham et al. Tool support for agent development using the Prometheus methodology
Combemale et al. Concern-oriented language development (COLD): Fostering reuse in language engineering
CN100507843C (en) Dynamic programing method
AU1956897A (en) Interactive software development system
Verano Merino et al. Block-based syntax from context-free grammars
Sotnik et al. Modern Integrated Software Development Environments
AU638999B2 (en) Incremental compiler for source-code development system
Engels et al. Graph grammar engineering: A method used for the development of an integrated programming support environment
Denti et al. tuProlog: Making Prolog ubiquitous
Ran Architectural structures and views
Trapp et al. Automated Combination of Real-Time Shader Programs.
Rura Refactoring aspect-oriented software
Lugato et al. Model-Driven Engineering for High Performance Computing Applications
Tenma et al. A system for generating language-oriented editors
Amparore Reengineering the Editor of the GreatSPN Framework.
Schöne et al. Incremental causal connection for self-adaptive systems based on relational reference attribute grammars
Boyland et al. Attributed transformational code generation for dynamic compilers
Li et al. Debugging with domain-specific events via macros
Bjarnason Interactive Tool Support for Domain-Specific Languages
Dausend et al. Towards a comprehensive extension of abstract state machines for aspect-oriented specification
Widemann et al. On-line synchronous total purely functional data-flow programming on the java virtual machine with sig

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090701

Termination date: 20120405