CN101826017B - Granule-oriented programming, integrating and developing platform - Google Patents
Granule-oriented programming, integrating and developing platform Download PDFInfo
- Publication number
- CN101826017B CN101826017B CN2010101727975A CN201010172797A CN101826017B CN 101826017 B CN101826017 B CN 101826017B CN 2010101727975 A CN2010101727975 A CN 2010101727975A CN 201010172797 A CN201010172797 A CN 201010172797A CN 101826017 B CN101826017 B CN 101826017B
- Authority
- CN
- China
- Prior art keywords
- module
- grain
- class
- information
- editor
- 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
Links
- 239000002245 particle Substances 0.000 claims description 57
- 238000000034 method Methods 0.000 claims description 50
- 230000010365 information processing Effects 0.000 claims description 47
- 238000012545 processing Methods 0.000 claims description 28
- 238000011161 development Methods 0.000 claims description 15
- 239000000284 extract Substances 0.000 claims description 13
- 230000008569 process Effects 0.000 claims description 10
- 230000003068 static effect Effects 0.000 claims description 10
- 230000006399 behavior Effects 0.000 claims description 9
- 238000012544 monitoring process Methods 0.000 claims description 6
- 230000006872 improvement Effects 0.000 claims description 4
- 230000004048 modification Effects 0.000 claims description 4
- 238000012986 modification Methods 0.000 claims description 4
- 238000000605 extraction Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 abstract description 14
- 239000008187 granular material Substances 0.000 abstract 7
- 230000009977 dual effect Effects 0.000 description 5
- 238000013461 design Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000007812 deficiency Effects 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 235000007926 Craterellus fallax Nutrition 0.000 description 1
- 240000007175 Datura inoxia Species 0.000 description 1
- 240000002853 Nelumbo nucifera Species 0.000 description 1
- 235000006508 Nelumbo nucifera Nutrition 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010429 evolutionary process Effects 0.000 description 1
- 239000012467 final product Substances 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a granule-oriented programming, integrating and developing platform, which is divided into an editor, a complier, a virtual machine, a debugger and a class-granule level structure constructor; and the editor, the complier and the debugger respectively and mutually communicate with the class-granule level structure constructor, and the debugger is also respectively connected with the editor and the virtual machine. The platform provides the encoding, the compiling and the debugging functions to a granule-oriented programming language; the program information is managed by the independent class-granule level structure constructor so that users can easily define granules by relying on the granule-oriented programming, integrating and developing platform and transparently integrate class codes and granule codes; and simultaneously, the automatic positioning function and the rich information between classes and granules also bring more convenience to code edition, fault determination and new granule compilation.
Description
Technical field
The invention belongs to computer application field, relate to a kind of programming integrated development system, especially a kind of programming integrated development system towards grain.
Background technology
Procedural language such as Fortran, Pascal and C etc. can be used for defining the program that straight line is carried out, and program starts from certain a bit, carries out to terminal step by step.In this pattern, design concept is embodied in the program element of carrying out in succession.The Module Division of straight line is embodied in the function call, and function call permission program is carried out and jumped to subroutine from master routine, again the rebound master routine.The use of subroutine makes the general program of the more effective realization of program.But along with the continuous increase of program scale, program becomes increasingly complex, and the process type language also becomes very complicated and is difficult to safeguard.
The appearance of object-oriented method becomes some independent objects to system state, can the privatization system state in these objects, and through these states of publicly-owned functions control, the Function Decomposition of program is each functional module.Higher level lanquage is through method modularized programs such as structuring are abstract, and object oriented language is through notions such as object and classes, this again further the behavior through gathering an entity with hide its inner realize the raising module in gather, reduce intermodule lotus root close.
Object-oriented has following superiority with respect to traditional design language and software design approach:
1) meets human knowledge and the thinking habit of analyzing things;
2) code can highly be reused, and is maintainable;
3) realized the modularization of functional module;
4) code be share, hereditable, reduced the size of code in the software design etc.
But OOP (OOP) also can not be perfect, has occurred a lot of deficiencies to OOP in recent years and has proposed new programming idea and corresponding implementation.
In object-oriented, when the consideration of some factors may influence the realization of the module (like functional module) of some systems, phenomenon appears very easily being not suitable for.This phenomenon that is not suitable for is not that the deficiency of system design causes, but in the complication system one naturally with inevitable phenomenon.For example, the operation of program is inseparable with its back-up environment.Computer program is the instruction that provides to computing machine, and program produces action, and computing machine is responsible for instruction and is carried out.Therefore, significant program except code also acquiescence lie on what computing machine and move.In a single day program operates on the other machines, perhaps can produce unforeseeable result and even can normally not move down, has drawn adaptability problem between program and the machine thus, and the factor of these considerations is exactly " context variable ".The context that program faced usually changes, such as processor number in input that program faced, system's free memory, the parallel system etc.Say that in a sense tradition programming mechanism has implicitly contained the relation between program and the context, but it supposes that potentially the relation between program and the context is changeless.Yet the program of supposition and the matching relationship between the context usually were destroyed when variable context made programming.Suppose that a class has no return type method m.For condition of different, method m possibly carry out different behaviors and develop and shake down.Traditional programming model possibly attempt to use inheritance, comes a plurality of candidates of behavior are realized dividing into groups through the subclass that defines such, addresses this problem.Yet; Though inheritance can realize the behavior version of this method through the mode of heavily loaded base class method in subclass, it is not enough to be used for to write a plurality of candidate's behaviors for certain method of some objects and realizes; In other words, the dynamic change that static inheritance can not the support target behavior.Certainly also can consider perhaps indicate which realization to be performed through the different parameters of method through using the diverse ways title to represent each to realize.But this requires client, just will call the object of this method, and the details that realizes is had at fingertips.So just destroyed the encapsulation property of class.
GOP (Granule-Oriented Programming) thought proposes on the basis of being not suitable for property of procedures of observation phenomenon.GOP be to use the grain and context extension Object-Oriented Programming Language.Such structure is independent of programming module, can be with to contextual consideration externalizing and qualificationization, rather than they are deployed in the important programming module.When system dynamics changes, context also is at random the variation of being in operation.The supervisory system of present stage can not be handled well and carry out the replacement of functional module to being fit to the current context needs.And grain and contextual combination, the fine problem that solves adaptability.
Present various programming languages are not all paid close attention to program adaptability problem, GOP in the program design of grain, with grain refer to those adaptabilities measurable, can be by the unit of the configuration program of dynamic replacement.If being not suitable for property has appearred in program, these being not suitable for property are localized to above the unaccommodated grain, thereby replace with the grain that is more suitable for, to reach the target of improvement program adaptability.
Programming, integrating and developing platform towards grain provides coding, compiling, debug function to the GOP language; The information of program is managed by class-granulosa aggregated(particle) structure constructor independently; We can be easy to the definition grain to leading surface to the programming, integrating and developing platform of grain; And with a category code and a grain code transparent fusion, simultaneously the automatic positioning function between class-grain and abundant information display function also make code editor, fault confirm and writing newly more convenient.
Summary of the invention
The objective of the invention is to overcome above-mentioned shortcoming of the prior art, a kind of programming integrated development system towards grain is provided, this integrated development system provides the coding of GOP language, compiling, debug function; The information of program is managed by class-granulosa aggregated(particle) structure constructor independently; We can be easy to the definition grain to leading surface to the programming, integrating and developing platform of grain; And a category code and a grain code merged pellucidly, simultaneously the automatic positioning function between class-grain and abundant information display function also make code editor, fault confirm and writing newly more convenient.
The objective of the invention is to solve through following technical scheme:
This programming integrated development system towards grain is divided into editing machine, compiler, virtual machine, debugger and class-granulosa aggregated(particle) structure constructor; Said editing machine, compiler and debugger intercom with class-granulosa aggregated(particle) structure constructor respectively mutually, and said debugger also is connected with virtual machine with editing machine respectively;
(1) editing machine
Described editing machine is made up of class editor module, grain editor module, category information module, grain information module, relation information module and window handover module; The class editor module comprises a class editor, and a grain editor module comprises a grain editor, and the category information module comprises a category information window, and a grain information module comprises a grain messagewindow; Said type of editor module is used to revise the edit object category code; Said grain editor module is used to revise edit object grain code; The category information module shows category information, and said category information comprises a class name and type file at place; The grain information module shows grain information, and said grain information comprises the file at grain name and grain place; Said relation information module comprises tree type display module, code display module and image display module; Tree type display module comprises a relation information tree type display window; The code display module comprises a relation information code display window; Image display module comprises a relation information graphical display window; Tree type display module shows the tree figure that type grain relation information and hierarchical structure constitute; The code display module shows the concrete code of all types and grain; Image display module shows the relation between the class that grain and it is depended on graph direct; Said window handover module is connected with class editor module, grain editor module, category information module, grain information module, relation information module respectively, realizes the switching of a type editor, grain editor, grain messagewindow, grain messagewindow, relation information tree type display window, relation information code display window and relation information graphical display window;
Said type is the OOP standard class; Said grain is the basic module in GOP field; Grain is made up of grain name, class name, plastochondria and shadow class; Wherein class name is used for showing the class that this depends on, and such is called the root class of grain, and plastochondria is used for specifying the expectation environment of grain; Plastochondria can define in self member and the plastochondria must comprise an adaptability determination methods, and the adaptability determination methods is returned true or false; Said shadow class be in the seed routine with the improvement of the class of this shadow class same name, be that the difference of class behavior under different contexts embodies, and just in corresponding plastochondria adaptability determination methods for just effective after very;
(2) compiler
The compiler of GOP is divided into front-end module and rear module; Front-end module comprises lexical analyzer, syntax analyzer and static semantic analyzer again, and static semantic analyzer specifically comprises name analysis module, type checking module, access control module again, confirms the assignment module; Lexical analyzer is according to the word in the word-building rule recognizer of GOP; Syntax analyzer abstract syntax tree AST of program structure to satisfying the GOP syntax rule; Static semantic analyzer with the modeling of object-oriented hierarchical structure, on the result of modeling, is accomplished semantic analytic process through the computation process of attributed grammar according to the semantic rules of GOP to the node on the abstract syntax tree; The grain tree that class byte code files, plastochondria byte code files, shadow class byte code files, seed routine-individual program configuration file and this individual program of rear module generator program is corresponding;
(3) virtual machine
The dummy machine system of GOP comprises loading subsystem, service data district and carries out engine; Load subsystem and comprise class loaders, grain loading bin, shadow class loaders and seed routine-individual program configuration file loading bin; The service data district comprises method district, heap, stack, PC register, nation method stack, context variable memory block and seed routine-individual program memory block; Carry out engine and be divided into a span judgment module, adaptability monitoring modular, grain replacement module, context management module and grain database management module;
(4) debugger
Said debugger comprises tracking module, grain indicating module, debugger window display module and individual program evolution module; Tracking module is used to follow the tracks of the source code of virtual machine operation; The grain indicating module is used to show the grain under the method that tracking module follows the tracks of; Debugger window display module shows the data field and the method information of the current operation of virtual machine; Individual program evolution module can show the contextual information that moves make mistakes preceding individual program with this individual program; Can show simultaneously the individual program of similar grain replacement front and back and the contextual information of this individual program;
(5) class-granulosa aggregated(particle) structure constructor
Described class-granulosa aggregated(particle) structure constructor comprises category information processing module, grain message processing module and relation information processing module; Said category information processing module extracts all category informations and hierarchical structure thereof in the GOP source code, and category information and hierarchical structure thereof are offered other modules; Said grain message processing module extracts all information and hierarchical structure thereof in the GOP source code, and grain information and hierarchical structure thereof are offered other modules; Said relation information processing module extract in the GOP source code type and grain between relation information, and the relation information between class and the grain offered other modules.
The class editor module of above-mentioned editing machine is connected with the relation information processing module with category information processing module, the grain message processing module of class-granulosa aggregated(particle) structure constructor respectively with the grain editor module; Class-granulosa aggregated(particle) structure constructor obtains the GOP source code from class editor module and grain editor module, and said category information processing module extracts all category informations and hierarchical structure thereof in the GOP source code; Said grain message processing module extracts all information and hierarchical structure thereof in the GOP source code; Relation information in the said relation information processing module extraction GOP source code between class and the grain.
The category information module of above-mentioned editing machine is connected with the category information processing module of class-granulosa aggregated(particle) structure constructor, and the category information module of editing machine is obtained all category informations and hierarchical structure thereof from the category information processing module of class-granulosa aggregated(particle) structure constructor.
The grain information module of above-mentioned editing machine is connected with the grain message processing module of class-granulosa aggregated(particle) structure constructor, and the grain information module of editing machine obtains all information and hierarchical structure thereof from the grain message processing module of class-granulosa aggregated(particle) structure constructor.
The relation information module of above-mentioned editing machine is connected with the relation information processing module of class-granulosa aggregated(particle) structure constructor, and the relation information display module of editing machine is from relation information processing module type of obtaining of class-granulosa aggregated(particle) structure constructor and the relation information between the grain.
The window handover module of above-mentioned editing machine is connected with the relation information processing module with category information processing module, the grain message processing module of class-granulosa aggregated(particle) structure constructor, realizes when window switches the information synchronization of front and back windows content.
The tracking module of above-mentioned debugger, grain indicating module and debugger window display module are connected with category information processing module, the grain message processing module of class-granulosa aggregated(particle) structure constructor respectively; Obtain all category informations and hierarchical structure thereof from the category information processing module of granulosa aggregated(particle) structure constructor, from granulosa aggregated(particle) structure constructor the grain message processing module obtain all information and hierarchical structure thereof, for debugging work provides indication information.
The tracking module of above-mentioned debugger, grain indicating module, debugger window display module are connected with virtual machine with editing machine respectively with individual program evolution module; Debugger starts editing machine and realizes the modification to code, and debugger obtains the status information of current operation from virtual machine.
The present invention has following beneficial effect:
1, the programming integrated development system towards grain provides coding, compiling, debug function to the GOP language.Constitute elementary cell because GOP has introduced this new program of grain, introduced this new element of context again in the grain simultaneously, defined plastochondria and these new constructions of shadow class, thereby the structure of GOP program is more complicated, mutual relationship information is more.Towards the programming integrated development system of grain the information of program is managed by class-granulosa aggregated(particle) structure constructor independently, make program information management and use more easy, for editor and debug phase provide the more supplementary of horn of plenty.
2, independent and transparent each other towards the programming integrated development system of grain to the editor and the debugging of class and grain; Make category code with the grain code editor and debug more convenient; It provides automatic location and related information Presentation Function again simultaneously, locatees root class and current type of grain that comprises that current grain depends on automatically; And the class-granulosa hierarchical structure chart of present procedure is provided, makes to the modification of code very easy.
The present procedure operation information that 3, need obtain except obtaining traditional integrating and developing platform towards the debugger of the programming integrated development system of grain; Also obtain the class-granulosa hierarchical structure chart of the contextual information and the present procedure of present procedure, help the rapid fault location of user position.Perhaps assistant editor carries out writing of new grain.
Description of drawings
Fig. 1 wants sketch map for each parts of programming integrated development system towards grain of the present invention;
Fig. 2 creates the process flow diagram of GOP software project for the present invention;
Fig. 3 is of the present invention type of editor and the dual display mode figure of grain messagewindow;
Fig. 4 is relation information tree type display window figure of the present invention;
Fig. 5 is relation information code display window figure of the present invention;
Fig. 6 is grain editor of the present invention and the dual display mode figure of category information window;
Fig. 7 is relation information graphical display window figure of the present invention;
Fig. 8 is debugger window display module figure of the present invention;
Fig. 9 is an individual program evolution module map of the present invention;
Figure 10 is a program debug process flow diagram of the present invention.
Embodiment
The present invention helps exploitation based on the development platform towards the software program of grain programming technique, and the integrating and developing platform that provides can make the user create fast, easily and debug towards the grain program.The concrete realization of the integrating and developing platform of this invention accomplished through computer software, can be through loading on the nondestructive storage medium, or download and install from one or more remote sites, or carry out this locality installation from remote computer.
Below in conjunction with accompanying drawing the present invention is done and to describe in further detail:
Referring to Fig. 1: the programming, integrating and developing platform 200 towards grain is made up of editing machine 210, compiler 220, virtual machine 230, debugger 240 and class-granulosa aggregated(particle) structure constructor 250; Said editing machine 210, compiler 220 intercom with class-granulosa aggregated(particle) structure constructor 250 respectively with debugger 240 mutually, and said debugger 240 also is connected with virtual machine 230 with editing machine 220 respectively;
Referring to Fig. 2: it has been described at the process flow diagram of under the programming, integrating and developing platform of grain, creating the GOP software project; Create or revise type source code 201 and grain source code 202 in step 310 through editing machine 210; Pass through class-granulosa aggregated(particle) structure constructor 250 in step 320, utilize class source code 201 and a category information of source code 202 extraction programs, grain information and class-grain relation information after editing; Class-granulosa aggregated(particle) structure constructor 250 is created along with the establishment renewal of category information and grain information thereupon and is upgraded.Class source code 201 after step 330 is through 220 couples of editors of compiler compiles with grain source code 202, generates byte code files, guarantees that all grain information can both be by correct processing; Procedure bytes sign indicating number file load operation after step 340 will compile through virtual machine 230; In the operation of step 350 monitoring facilities in virtual machine, if do not find mistake in step 350, performance history is accomplished in step 370.If the discovery mistake uses debugger 240 to locate mistake in step 360, editing machine 210 is launched once more and is revised editor's type source code 201 and grain source code 202.This circulation lasts till that always program is errorless, finishes in the step 370 then.
1 editing machine
Described editing machine 210 is made up of class editor module 211, grain editor module 212, category information module 213, grain information module 214, relation information module 215 and window handover module 216; Class editor module 211 comprises a class editor, and a grain editor module 212 comprises a grain editor, and category information module 213 comprises a category information window, and a grain information module 214 comprises a grain messagewindow; Said type of editor module 211 is used to revise the edit object category code; Grain editor module 212 is used to revise edit object grain code; Category information module 213 shows category information, and category information comprises a class name and type file at place; Grain information module 214 shows grain information, and grain information comprises the file at grain name and grain place; Relation information module 215 comprises tree type display module, code display module and image display module; Tree type display module comprises a relation information tree type display window; The code display module comprises a relation information code display window; Image display module comprises a relation information graphical display window; Tree type display module shows the tree figure that type grain relation information and hierarchical structure constitute; The code display module shows the concrete code of all types and grain; Image display module shows the relation between the class that grain and it is depended on graph direct; Window handover module 216 is connected with class editor module 211, grain editor module 212, category information module 213, grain information module 214, relation information module 215 respectively, realizes the switching of a type editor, grain editor, grain messagewindow, grain messagewindow, relation information tree type display window, relation information code display window and relation information graphical display window.
Said type is the OOP standard class; Said grain is the basic module in GOP field; Grain is made up of grain name, class name, plastochondria and shadow class; Wherein class name is used for showing the class that this depends on, and such is called the root class of grain, and plastochondria is used for specifying the expectation environment of grain; Plastochondria can define in self member and the plastochondria must comprise an adaptability determination methods, and the adaptability determination methods is returned true or false; Said shadow class be in the seed routine with the improvement of the class of this shadow class same name, be that the difference of class behavior under different contexts embodies, and just in corresponding plastochondria adaptability determination methods for just effective after very.
In the integrated development system of grain, support single display pattern and dual display mode in the present invention; The single display pattern provides single window to show; The user can be between the grain messagewindow of the class editor of class editor module 211 and grain information module 214, or comes switch window through window handover module 216 between the category information window of grain editor and the category information module 213 of grain editor module 212; In dual display mode, the user can make at the class editor of class editor module 211 and the grain messagewindow of grain information module 214, or the category information window of grain editor and the category information module 213 of grain editor module 212 shows simultaneously.In the Figure of description each figure is the characteristic that example shows this invention with dual display mode in the present invention.
Referring to Fig. 3: type editor shows simultaneously that with a grain messagewindow grain tabulation shows that at the grain messagewindow of grain information module 214 the grain tabulation is used for showing the information of relevant grain; Code in the class editor of class editor module 211 is the root category code that grain depends on.In the class editor, the user can revise editor's type source code.A cursor 312 points to next input position.The grain messagewindow is a grain tabulation, and each row in the tabulation comprises the file name 324 at a title 323 and grain place.The user can select Jump button 313; Jump button 313 can start the code display module of relation information module 215; All grain codes are presented in the relation information code display window with the root category code that they are depended on, and relation information code display window is as shown in Figure 5; The user can type of selection-grain information button 314; Class-grain information button 314 can start the tree-like display module of relation information module 215; The tree figure of class grain relation information and hierarchical structure formation is presented in the tree-like display window of relation information, and the tree-like display window of relation information is as shown in Figure 4.
According to the present invention, the hierarchical structure of class-grain is presented in the window 410 among Fig. 4 with the mode of figure, this make the user more fast type of understanding and the grain between relation.Referring to Fig. 4: in window 410, type represent and represent with rectangle 316 with oval 315.If a grain depends on a certain type, so just there is an arrow to point to oval 315 from the rectangle 316s.When the user clicks one of them title from window 410, the file address of corresponding grain title and grain will show in grain messagewindow 420.In window 420, being shown of information of grain, content displayed comprises the file at grain name and grain place.The user can select Jump button 313; Jump button 313 can start the code display module of relation information module 215; All grain codes are presented in the relation information code display window with the root category code that they are depended on, and relation information code display window is as shown in Figure 5.
According to the present invention, the user through the window in Fig. 5 510 see in Fig. 3 or Fig. 4, shown the class with the grain specific code.Referring to Fig. 5: what show at the Far Left of window 510 is the source code of the class of present procedure, and the source code of the grain that class that the right shows successively and this program is associated.
Referring to Fig. 6: grain editor and category information window show simultaneously; The user can write the code and the code of revising existing grain of new grain in the grain editor of grain editor module 212; The category information window of category information window module 213 is class list window, the information of the class that grain depended in the grain editor of its demonstration grain editor module 212.In order to select the grain of grain in the editor of an editor module 212, the user can through on the position of moving cursor 312 a certain grain in the grain editor of grain editor module 212 then antibonding click it.In case a grain is selected, the displaying contents of the category information window of category information window module 213 will be updated, and at this moment it will only show the information of the class that grain depended on that this is selected.
Referring to Fig. 7: it is a relation information graphical display window figure, in window 710, grain and type between relation be shown with the mode of figure, the user can understand the relation between the class that grain and it is depended on apace through the figure that shows.An example is presented among Fig. 7, and type 720 usefulness ellipses represent that grain 730 usefulness rectangles are represented.These three grains of overlapping demonstration of the figure of the figure of representation class and other three expression grains are to depend on this type.In addition, grain with type can also represent with other modes, as use other different patterns, perhaps have the same figure of different colours, perhaps other can distinguish the mode of the two.On the other hand, the relation between grain and the class can also be represented with the connector that connects different graphic except representing with the mode of stack.
2 compilers
Grain is realized through the compiler 220 towards grain the effect of class.The class source code 201 of GOP compiler 220 after with editor and grain source code 201 be as input, to class with produce scale-of-two byte sign indicating number file respectively as output, offer the operation of virtual machine 230, compiler 220 also is connected with debugger simultaneously.
The compiler 220 of GOP is divided into front-end module and rear module; Front-end module comprises lexical analyzer, syntax analyzer and static semantic analyzer again, and static semantic analyzer specifically comprises name analysis module, type checking module, access control module again, confirms the assignment module; Lexical analyzer is according to the word in the word-building rule recognizer of GOP; Syntax analyzer abstract syntax tree AST of program structure to satisfying the GOP syntax rule; Static semantic analyzer with the modeling of object-oriented hierarchical structure, on the result of modeling, is accomplished semantic analytic process through the computation process of attributed grammar according to the semantic rules of GOP to the node on the abstract syntax tree; The grain tree that class byte code files, plastochondria byte code files, shadow class byte code files, seed routine-individual program configuration file and this individual program of rear module generator program is corresponding.
Said seed routine is one and do not join and do not comprise any program with any context dependent, and said individual program is a program that joins with existing context dependent, individual program by seed routine with depend on forming of seed routine; Described context is meant all non-functional factors comprehensive of support program; The class hierarchy of seed routine-individual program configuration file record seed routine and individual program and the XML file of all kinds of grains that depend on.The XML file of the described grain tree reflection grain that individual program comprised and the level of grain.
3 virtual machines
The service data district comprises method district, heap, stack, PC register, nation method stack, context variable memory block and seed routine-individual program memory block; The context variable memory block is used to store the contextual information that influences program; Seed routine-individual program memory block is used to store seed routine-individual program configuration file that loading is come in.
Carry out engine and be divided into a span judgment module, adaptability monitoring modular, grain replacement module, context management module and grain database management module; Grain span judgment module is responsible for judging a grain range spans of a calling judgement, and the adaptability monitoring modular is used for the adaptability of monitoring facilities, and a grain replacement module is used to search similar grain; Program is made the replacement and the evolutionary process of program, and context management module provides the value and the update notification of the context variable that grain is concerned about in the program, contextual variation; In time feed back in the program and go, impel program in time to make adaptability and judge that the grain database management module is responsible for searching of similar grain; And the storing in the database of new individuality that produces after the program evolution gone; Expand the grain storehouse, the better operation for program has increased better guarantee.
4 debuggers
Said debugger 240 comprises tracking module 241, grain indicating module 242, debugger window display module 243 and individual program evolution module 244; Tracking module 241 is used to follow the tracks of the source code of virtual machine operation; Grain indicating module 242 is used to show the grain under the method that tracking module follows the tracks of; Debugger window display module 243 shows the data field and the method information of the current operation of virtual machine; Individual program evolution module 244 can show the contextual information that moves make mistakes preceding individual program with this individual program, can show similar the contextual information of replacing individual program with this individual program of front and back simultaneously.
Referring to Fig. 8: tracking module 241 can be followed the tracks of a method and carry out; Main window 810 shows the source code of class; In class-granulosa aggregated(particle) structure constructor 250; Debugger 240 is at first accepted the grain information of category information with the grain message processing module 252 of category information processing module 251, and then at the corresponding position display grain of source code indicator 820, indicator 820 expressions are by the grain in the code of tracking source.
When the user uses mouse or other pointing device antibondings to click main window 810; Debugger 240 will eject a grain list window 830; The grain that this window shows all with main window 810 in code be associated; This list window comprises the filename 833 at 831, one grain methods of a grain name or a grain variable 832 and a grain place; In addition, when the user can click a certain name in grain window 830 through mouse or other pointing devices, this source code will be presented in the grain CodeWindow 840 that is ejected.
According to the present invention, a grain indicator only is associated with a grain, and debugger 240 just directly ejects the grain CodeWindow rather than shows a grain list window that only comprises single grain.
If the user wants to see the contextual information of the preceding individual program of debugging and this individual program; Or want to see individual program and the contextual information of this individual program before and after the similar grain replacement; The Jump button 313 that the user only need click among Fig. 8 gets final product; Jump button 313 starts individual program evolution module map; Can show individual program that debugging is preceding and the individual program structural representation of newly writing, the individual program structural representation when perhaps current operation individual program was replaced with its last time.
Referring to Fig. 9: the oval representation class in window 910 and window 920, rectangle is represented grain, round rectangle representes to be not suitable for the grain of current environment; In window 910; What show is the structure when the current individual program last time replacement taking place; Window 920 is structural drawing of current operation individual program, the code and the contextual information of the individual program in window 930 and window 940 difference display windows 910 and window 920.
Referring to Figure 10: the user can step 1010 use GOP program of debugger 240 debugging.Before debugging, this program towards particle must be written into compiler 220.After program is loaded, a plurality of existence have been judged whether in the information of step 1020 through type of deriving from-granulosa aggregated(particle) structure constructor 250.If a plurality of existence are arranged, will show a grain list window 830 in step 1030.This window is listed all grains relevant with this program that is written into.In case the user can select a grain in the grain list window 830 in step 1040, grain CodeWindow 840 will be ejected the source code 202 that shows this so.If have only a grain to exist in step 1020, debugger 240 is leapt to step 1050 a demonstration grain CodeWindow 840 so.
The tracking module 241 of described debugger 240, grain indicating module 242, debugger window display module 243 are connected with virtual machine 230 with editing machine 220 respectively with individual program evolution module 244; Debugger 240 starts the modification that editing machine 220 is realized code, and debugger 240 obtains the status information of current operation from virtual machine 230.
5 types-granulosa aggregated(particle) structure constructor
Described class-granulosa aggregated(particle) structure constructor 250 comprises category information processing module 251, grain message processing module 252 and relation information processing module 253; Said category information processing module 251 extracts all category informations and hierarchical structure thereof in the GOP source code, and category information and hierarchical structure thereof are offered other modules; Said grain message processing module 252 extracts all information and hierarchical structure thereof in the GOP source code, and grain information and hierarchical structure thereof are offered other modules; Said relation information processing module 253 extract in the GOP source codes type and grain between relation information, and the relation information between class and the grain offered other modules.
The class editor module 211 of said editing machine 210 is connected with relation information processing module 253 with category information processing module 251, the grain message processing module 252 of class-granulosa aggregated(particle) structure constructor 250 respectively with grain editor module 212, and class-granulosa aggregated(particle) structure constructor 250 obtains the GOP source code from class editor module 211 and grain editor module 212.
The category information module 213 of described editing machine 210 is connected with the category information processing module 251 of class-granulosa aggregated(particle) structure constructor 250, and the category information module 213 of editing machine 210 is obtained all category informations and hierarchical structure thereof from the category information processing module 251 of class-granulosa aggregated(particle) structure constructor 250.
The grain information module 214 of described editing machine 210 is connected with the grain message processing module 252 of class-granulosa aggregated(particle) structure constructor 250, and the grain information module 214 of editing machine 210 obtains all information and hierarchical structure thereof from the grain message processing module 252 of class-granulosa aggregated(particle) structure constructor 250.
The relation information module 215 of described editing machine 210 is connected with the relation information processing module 253 of class-granulosa aggregated(particle) structure constructor 250, and the relation information module 215 of editing machine 210 is from relation information processing module 253 types of obtaining of class-granulosa aggregated(particle) structure constructor 250 and the relation information between the grain.
The window handover module 216 of described editing machine 210 is connected with relation information processing module 253 with category information processing module 251, the grain message processing module 252 of class-granulosa aggregated(particle) structure constructor 250, realizes when window switches the information synchronization of front and back windows content.
The tracking module 241 of described debugger 240, grain indicating module 242 and debugger window display module 243 are connected with category information processing module 251, the grain message processing module 252 of class-granulosa aggregated(particle) structure constructor 250 respectively; Obtain all category informations and hierarchical structure thereof from the category information processing module 251 of granulosa aggregated(particle) structure constructor 250, from granulosa aggregated(particle) structure constructor 250 the grain message processing module 252 obtain all information and hierarchical structure thereof, for debugging work provides indication information.
Claims (1)
1. programming integrated development system towards grain, it is characterized in that: said programming integrated development system towards grain comprises editing machine, compiler, virtual machine, debugger and class-granulosa aggregated(particle) structure constructor; Said editing machine, compiler and debugger intercom with class-granulosa aggregated(particle) structure constructor respectively mutually, and said debugger also is connected with virtual machine with editing machine respectively;
(1) editing machine
Described editing machine is made up of class editor module, grain editor module, category information module, grain information module, relation information module and window handover module; The class editor module comprises a class editor, and a grain editor module comprises a grain editor, and the category information module comprises a category information window, and a grain information module comprises a grain messagewindow; Said type of editor module is used to revise the edit object category code; Said grain editor module is used to revise edit object grain code; The category information module shows category information, and said category information comprises a class name and type file at place; The grain information module shows grain information, and said grain information comprises the file at grain name and grain place; Said relation information module comprises tree type display module, code display module and image display module; Tree type display module comprises a relation information tree type display window; The code display module comprises a relation information code display window; Image display module comprises a relation information graphical display window; Tree type display module shows the tree figure that type grain relation information and hierarchical structure constitute; The code display module shows the concrete code of all types and grain; Image display module shows the relation between the class that grain and it is depended on graph direct; Said window handover module is connected with class editor module, grain editor module, category information module, grain information module, relation information module respectively, realizes the switching of a type editor, grain editor, category information window, grain messagewindow, relation information tree type display window, relation information code display window and relation information graphical display window;
The class editor module of said editing machine is connected with the relation information processing module with category information processing module, the grain message processing module of class-granulosa aggregated(particle) structure constructor respectively with the grain editor module; Class-granulosa aggregated(particle) structure constructor obtains the GOP source code from class editor module and grain editor module, and said category information processing module extracts all category informations and hierarchical structure thereof in the GOP source code; Said grain message processing module extracts all information and hierarchical structure thereof in the GOP source code; Relation information in the said relation information processing module extraction GOP source code between class and the grain;
The category information module of described editing machine is connected with the category information processing module of class-granulosa aggregated(particle) structure constructor, and the category information module of editing machine is obtained all category informations and hierarchical structure thereof from the category information processing module of class-granulosa aggregated(particle) structure constructor;
The grain information module of described editing machine is connected with the grain message processing module of class-granulosa aggregated(particle) structure constructor, and the grain information module of editing machine obtains all information and hierarchical structure thereof from the grain message processing module of class-granulosa aggregated(particle) structure constructor;
The relation information module of described editing machine is connected with the relation information processing module of class-granulosa aggregated(particle) structure constructor, and the relation information module of editing machine is from relation information processing module type of obtaining of class-granulosa aggregated(particle) structure constructor and the relation information between the grain;
The window handover module of described editing machine is connected with the relation information processing module with category information processing module, the grain message processing module of class-granulosa aggregated(particle) structure constructor, realizes when window switches the information synchronization of front and back windows content;
Said type is the OOP standard class; Said grain is the basic module in GOP field; Grain is made up of grain name, class name, plastochondria and shadow class; Wherein class name is used for showing the class that this depends on, and such is called the root class of grain, and plastochondria is used for specifying the expectation environment of grain; Plastochondria can define in self member and the plastochondria must comprise an adaptability determination methods, and the adaptability determination methods is returned true or false; Said shadow class be in the seed routine with the improvement of the class of this shadow class same name, be that the difference of class behavior under different contexts embodies, and just in corresponding plastochondria adaptability determination methods for just effective after very;
(2) compiler
The compiler of GOP is divided into front-end module and rear module; Front-end module comprises lexical analyzer, syntax analyzer and static semantic analyzer again, and static semantic analyzer specifically comprises name analysis module, type checking module, access control module again, confirms the assignment module; Lexical analyzer is according to the word in the word-building rule recognizer of GOP; Syntax analyzer abstract syntax tree AST of program structure to satisfying the GOP syntax rule; Static semantic analyzer with the modeling of object-oriented hierarchical structure, on the result of modeling, is accomplished semantic analytic process through the computation process of attributed grammar according to the semantic rules of GOP to the node on the abstract syntax tree; The grain tree that class byte code files, plastochondria byte code files, shadow class byte code files, seed routine-individual program configuration file and this individual program of rear module generator program is corresponding;
(3) virtual machine
The dummy machine system of GOP comprises loading subsystem, service data district and carries out engine; Load subsystem and comprise class loaders, grain loading bin, shadow class loaders and seed routine-individual program configuration file loading bin; The service data district comprises method district, heap, stack, PC register, nation method stack, context variable memory block and seed routine-individual program memory block; Carry out engine and be divided into a span judgment module, adaptability monitoring modular, grain replacement module, context management module and grain database management module;
(4) debugger
Said debugger comprises tracking module, grain indicating module, debugger window display module and individual program evolution module; Tracking module is used to follow the tracks of the source code of virtual machine operation; The grain indicating module is used to show the grain under the method that tracking module follows the tracks of; Debugger window display module shows the data field and the method information of the current operation of virtual machine; Individual program evolution module can show the contextual information that moves make mistakes preceding individual program with this individual program; Can show simultaneously the individual program of similar grain replacement front and back and the contextual information of this individual program;
The tracking module of described debugger, grain indicating module and debugger window display module are connected with category information processing module, the grain message processing module of class-granulosa aggregated(particle) structure constructor respectively; Obtain all category informations and hierarchical structure thereof from the category information processing module of class-granulosa aggregated(particle) structure constructor, from class-granulosa aggregated(particle) structure constructor the grain message processing module obtain all information and hierarchical structure thereof, for debugging work provides indication information;
The tracking module of described debugger, grain indicating module, debugger window display module are connected with virtual machine with editing machine respectively with individual program evolution module; Debugger starts editing machine and realizes the modification to code, and debugger obtains the status information of current operation from virtual machine;
(5) class-granulosa aggregated(particle) structure constructor
Described class-granulosa aggregated(particle) structure constructor comprises category information processing module, grain message processing module and relation information processing module; Said category information processing module extracts all category informations and hierarchical structure thereof in the GOP source code, and category information and hierarchical structure thereof are offered other modules; Said grain message processing module extracts all information and hierarchical structure thereof in the GOP source code, and grain information and hierarchical structure thereof are offered other modules; Said relation information processing module extract in the GOP source code type and grain between relation information, and the relation information between class and the grain offered other modules.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010101727975A CN101826017B (en) | 2010-05-14 | 2010-05-14 | Granule-oriented programming, integrating and developing platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010101727975A CN101826017B (en) | 2010-05-14 | 2010-05-14 | Granule-oriented programming, integrating and developing platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101826017A CN101826017A (en) | 2010-09-08 |
CN101826017B true CN101826017B (en) | 2012-11-28 |
Family
ID=42689949
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010101727975A Expired - Fee Related CN101826017B (en) | 2010-05-14 | 2010-05-14 | Granule-oriented programming, integrating and developing platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101826017B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102591661A (en) * | 2011-12-30 | 2012-07-18 | 苏州汉清投资管理有限公司 | System for realizing software integration |
CN105302623A (en) * | 2014-07-28 | 2016-02-03 | 中兴通讯股份有限公司 | Compiling method, control method, running method and device |
US10719303B2 (en) * | 2015-06-07 | 2020-07-21 | Apple Inc. | Graphics engine and environment for encapsulating graphics libraries and hardware |
CN106933643A (en) * | 2015-12-30 | 2017-07-07 | 迈普通信技术股份有限公司 | A kind of code compiling method, equipment and system |
CN107992295B (en) * | 2017-12-29 | 2021-01-19 | 西安交通大学 | Particle-oriented dynamic algorithm selection method |
CN114489682B (en) * | 2022-04-14 | 2022-08-02 | 北京宝兰德软件股份有限公司 | Method, device and equipment for operating nginx configuration file |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5509116A (en) * | 1990-03-30 | 1996-04-16 | International Business Machines Corporation | Graphical user interface management system |
CN101071378A (en) * | 2006-05-12 | 2007-11-14 | 日立软件工程株式会社 | Source code generation method, apparatus and program |
CN101645010A (en) * | 2009-08-20 | 2010-02-10 | 深圳市珍爱网信息技术有限公司 | System and method for automatically generating code |
-
2010
- 2010-05-14 CN CN2010101727975A patent/CN101826017B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5509116A (en) * | 1990-03-30 | 1996-04-16 | International Business Machines Corporation | Graphical user interface management system |
CN101071378A (en) * | 2006-05-12 | 2007-11-14 | 日立软件工程株式会社 | Source code generation method, apparatus and program |
CN101645010A (en) * | 2009-08-20 | 2010-02-10 | 深圳市珍爱网信息技术有限公司 | System and method for automatically generating code |
Also Published As
Publication number | Publication date |
---|---|
CN101826017A (en) | 2010-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6067641A (en) | Demand-based generation of symbolic information | |
CA2144874C (en) | Incremental build system | |
US5325533A (en) | Engineering system for modeling computer programs | |
EP3377968B1 (en) | Dynamic update of an application in compilation and deployment | |
CN101826017B (en) | Granule-oriented programming, integrating and developing platform | |
CN102541521B (en) | Automatic operating instruction generating device based on structured query language and method | |
US5519866A (en) | Method and apparatus of incrementally linking components of a modeled computer program | |
EP1942411B1 (en) | Producer graph oriented programming and execution | |
US20040261065A1 (en) | Method and system for compiling multiple languages | |
CN104662514A (en) | Modernization of legacy software systems based on modeled dependencies | |
EP1958062A2 (en) | Producer graph oriented programming framework with scenario support | |
JPH01166141A (en) | Debugging system | |
CN102696012A (en) | Creating inferred symbols from code usage | |
CN105117210A (en) | WSCN-oriented graphical programming system | |
CN100462920C (en) | Unwind information for optimized programs | |
CN103019787A (en) | Function call relation determining method, hotfix updating method and hotfix updating device | |
CN113296786B (en) | Data processing method, device, electronic equipment and storage medium | |
CN102696026A (en) | Efficient immutable syntax representation with incremental change | |
Anderson | A computer for direct execution of algorithmic languages | |
CN100504761C (en) | Method for mapping debugging information in system of different kinds | |
CN1894674A (en) | Memory access instruction vectorization | |
CN113342389B (en) | Service updating method and device and computer readable storage medium | |
KR20190060561A (en) | THE INTERGRATED IoT PROGRAMMING METHOD AND SYSTEM WITH SELECTIVE ABSTRACTION OF THIRD-PARTY DEVICES | |
CN102750167A (en) | Method and device for starting application program and computer system | |
CN107562430B (en) | Compiling method for file processing function of mobile pi-calculus language |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20121128 |
|
CF01 | Termination of patent right due to non-payment of annual fee |