Application framework phasing model
Background
Generally speaking, software systems are come complete operation through executive process in computing machine.Usually, individual process can comprise several simple task or method.For correctly accomplishing process, must accomplish these straightforward procedures with particular order, can be imported into another straightforward procedure because derive from the result of a straightforward procedure.If these methods attempt before receiving correct input, to carry out, if perhaps a method provides untimely result, then whole process may be failed.Thus, the execution sequence of method is very important in the software systems.
For the software developer, the ordering of method becomes a main concerned issue when developing software code.Generally speaking, the method in the software systems is made other method and being called, and makes other method can carry out and provide a certain operation.The software developer must be noted that the order of calling to method, and attempts to write and do not consider to call the code that order can be operated in any situation.Unfortunately, exploitation is extremely difficult with the elaborated code of under any condition, operating flexibly enough.When the size of software application and complicacy increased, the possible burst of calling order increases to make and is very difficult to the correct ordering that realizes method call.The burden that the software developer is applied becomes particularly important when a plurality of method of several different method is called in existence, the result who wherein returns must arrive so that the process correct execution with particular order.Equally, the software developer is difficult to test and has the flexible code of in the operational scenario that changes, making the various methods of calling.
The present invention makes about these and other consideration item just.
General introduction
The some notions of this general introduction will in following detailed description, further describe with the form introduction of simplifying are provided.This general introduction is not intended to identify the key feature or the principal character of theme required for protection, is not intended to be used to help to confirm the scope of theme required for protection yet.
The present invention can retrain the execution of software approach in The whole calculations machine system.Generally speaking, the invention provides a kind of multilayer phasing model, it is constrained in two or more stages with the execution of software approach, and each stage possibly have two or more subs.Stage is a mode of operation of dividing the method for software systems.All methods in the subregion only are restrained to be carried out during moment.When one group of component software is reached an agreement to public in the stage space stage by stage, the establishing stage territory.Stage space has been confirmed effective sequence of stages.In various embodiments of the present invention, stage space is to confirm to be used for the effective stage of component software and the limited digraph of effective phase transition.
In various embodiments of the present invention, component software is obeyed phase constraint.Phase constraint is the effectively static constraint in a certain software program context of restriction stage.Phase constraint can be applied to software program section, thereby guarantees that execution thread will be in the stage of deferring to this constraint as long as carry out this software program section.Be the application stage constraint, component software can comprise the data structure that forms phase constraint attribute.The part of metadata when this phase constraint attribute can be the operation of component software.
In various embodiments of the present invention, a kind of computer-readable medium comprises a plurality of assemblies that occupy the phase one territory.In certain embodiments, first subclass of component software occupies first sub-phase domain, and second subclass of component software occupies second sub-phase domain.In certain embodiments of the present invention, sub is to accumulate in the stage of a father under the stage.
In one embodiment, the invention provides a kind of method that is used for each stage in the software systems that the execution of a plurality of methods is divided into.This method is at first transferred to the phase one that possibly have two or more subs.The execution of first group of methods is restrained to the phase one.Yet computer system transferring is to one or more other stages, and wherein the execution of one or more groups other method is restrained to one or more other stages.At last, computer system transferring is to one or more other stages.
In various embodiments of the present invention, a kind of software systems are provided also.These software systems comprise that control is used for main guidance device (director) assembly in one group of stage of whole software system.Guidance device is the software construction of the phase transition in the control stage space.In certain embodiments, one or more sub-guidance devices are registered to main guidance device, and control one or more groups sub.One or more assemblies are registered to one or more guidance devices, and are restrained to only manner of execution during one or more stages.
The present invention can be implemented as computer processes, computing system or such as goods such as computer programs.Computer program can be can be by computer system reads and the computer-readable storage medium of the computer program of the instruction that is used for the object computer process of having encoded.Computer program can also be the transmitting signal on the carrier wave of computer program of the readable and instruction that is used for the object computer process of having encoded of computing system.
With reference to the accompanying drawing of following brief overview, the detailed description and the appended claims of following various embodiments of the present invention, can obtain the present invention and improved more complete understanding thereof.
The accompanying drawing summary
Fig. 1 is an embodiment that can in computer environment, operate according to the present invention with the multilayer phasing model that the execution of software approach is sorted.
Fig. 2 illustrates the computing environment of operations according to the instant invention phasing model and the block diagram of computing equipment.
Fig. 3 be according to of the present invention have be used at the embodiment of stage model the modular software system of the component software of the execution of software approach ordering.
Fig. 4 is an embodiment who in The whole calculations machine system, operates with first or top layer stage model or the space that the execution of this intrasystem any software approach is sorted according to of the present invention.
Fig. 5 be according to of the present invention can be at a embodiment such as the sub-phase space of one or more stage manipulate of the main stage spaces such as main stage space of Fig. 4, they are to the data retrieval and write and sort.
Fig. 6 A and Fig. 6 B be according to of the present invention can be at embodiment such as the sub-phase space of one or more stage manipulate of the main stage spaces such as main stage space of Fig. 4, they sort to the configuration and the operation of plug and play system.
Fig. 7 shows according to of the present invention and comprises data structure or the embodiment of linguistic property that explanation is constrained in the execution of software approach the phase constraint attribute in a certain stage.
Fig. 8 A and 8B show an embodiment who is used for the operation method stage by stage of computer system according to of the present invention.
Fig. 9 is the exemplary computer system that is used for providing and be stored in the contact information of customer of territory stage by stage operating according to of the present invention.
Describe in detail
Accompanying drawing referring now to exemplary embodiment of the present invention shown in it describes the present invention more comprehensively.Yet the present invention can specialize with many different forms, and should not be interpreted as and be limited to embodiment described herein.On the contrary, these embodiment are provided, and make it to pass on scope of the present invention fully to those skilled in the art so that disclosure is comprehensive and complete.
Generally speaking, retrain the execution of software approach in computer system through making component software obey the multilayer phasing model stage by stage.Component software can type of being, other software code construct in object, method or the computer system.Stage is while and the common mode of operation of being shared by one group of component software.Computer system is carried out the top layer phasing model, be also referred to as main phasing model, and one or more sub takes place during one or more stages of this main phasing model.Operation in the computer system is constrained to one group of stage or sub.
An exemplary embodiment of multilayer phasing model 100 is shown in Fig. 1.This multilayer phasing model has first or the main stage model that comprises three phases 102,104 and 106.The main stage takes place with the order of being described by arrow 116.Two sub-phase, promptly sub 1 108 takes place during the stage 1 102 with sub 2 110.In addition, two sub-phase in addition, promptly sub 2a and sub 2b take place during sub 2.Thus, phasing model 100 has represented to have one group of multilayer stage of the sub that during other stage or sub, takes place.Hereinafter, any discussion to the stage also can be applicable to sub.
Each component software is restrained in a moment and operates.Each software approach is imposed restriction only during the stage that this software approach is constrained to, to carry out or to be called.Can cause the software approach of conflict or contradictory outcome to be constrained to the different stages, can not call legally from the current generation at those stage software approachs.Thus, each software approach is carried out in known manner and can between the method for accomplishing the contradiction task, do not produced conflict.All methods are all carried out down in particular phase constraint, make software systems be called as to be in the state with current generation constraint compatibility.
An example that wherein can realize suitable computingasystem environment 200 of the present invention is shown in Fig. 2.Computingasystem environment 200 is merely an example of suitable computing environment, is not that usable range of the present invention or function are proposed any limitation.Should computing environment 200 be interpreted as yet the arbitrary assembly shown in the exemplary operation environment 200 or its combination are had any dependence or demand.
The present invention can use numerous other general or special-purpose computing system environment or configuration to operate.The example that is applicable to well-known computing system of the present invention, environment and/or configuration includes but not limited to, personal computer, server computer, hand-held or laptop devices, multicomputer system, the system based on microprocessor, STB, programmable consumer electronics, network PC, minicomputer, large scale computer, comprises DCE of arbitrary said system or equipment or the like.
The present invention can describe in the general context of the computer executable instructions of being carried out by computing machine such as program module etc.Generally speaking, program module comprises routine, program, object, assembly, data structure or the like, and they are carried out specific task or realize specific abstract data type.The present invention also can put into practice in DCE, and wherein, task is carried out by this locality and teleprocessing equipment through linked.In DCE, program module can be arranged in this locality and the remote computer storage medium that comprises memory storage device.
With reference to figure 2, be used to realize that exemplary computer system 200 of the present invention comprises the universal computing device of computing machine 210 forms.The assembly of computing machine 210 can include but not limited to, processing unit 220, system storage 230 and will comprise that the sorts of systems assembly of system storage 230 is coupled to the system bus 221 of processing unit 220.System bus 221 can be any of some kinds of types of bus structure, comprises memory bus or Memory Controller, peripheral bus and uses any the local bus in all kinds of bus architectures.As an example but not the limitation; This type architecture comprises ISA(Industry Standard Architecture) bus, MCA (MCA) bus, strengthens ISA (EISA) bus, Video Electronics Standards Association's (VESA) local bus and peripheral component interconnect (pci) bus, is also referred to as the Mezzanine bus.
Computing machine 210 generally includes various computer-readable mediums.Computer-readable medium can be can be by arbitrary usable medium of computing machine 210 visit, comprises volatibility and non-volatile media, removable and removable medium not.As an example but not the limitation, computer-readable medium comprises computer-readable storage medium and communication media.Computer-readable storage medium comprises the volatibility that realizes with arbitrary method or the technology that is used to store such as information such as computer-readable instruction, data structure, program module or other data and non-volatile, removable and removable medium not.Computer-readable storage medium includes but not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic holder, tape, disk storage or other magnetic storage apparatus, maybe can be used for storing desired information and can be by arbitrary other medium of computing machine 210 visits.Communication media is embodied as such as the computer-readable instruction in the modulated message signal of carrier wave or other transmission mechanism, data structure, program module or other data usually, and comprises arbitrary information-delivery media.Term " modulated message signal " refers to be provided with or change with the mode that the information in the signal is encoded the signal of its one or more characteristics.As an example but not limitation, communication media comprises wire medium, as cable network or directly line connect, and wireless medium is like acoustics, RF, infrared and other wireless medium.Above-mentioned arbitrary combination also should be included within the scope of computer-readable medium.
System storage 230 comprises the computer-readable storage medium with volatibility and/or nonvolatile memory form, like ROM (read-only memory) (ROM) 231 and random-access memory (ram) 232.Basic input/output 233 (BIOS) comprises as when starting, helping the basic routine of transmission information between the element in computing machine 210, is stored in usually among the ROM 231.RAM 232 comprises addressable immediately and/or current data of operating of processing unit 220 and/or program module usually, such as phasing model 100.As an example but not the limitation, Fig. 2 shows operating system 234, application program 235, other program module 236 and routine data 237; Can be used for being stored among the RAM 232 or sorting such as phasing model 100 phasing models such as grade from the execution of all softwares of wherein carrying out.
Computing machine 210 also can comprise other removable/not removable, volatile/nonvolatile computer storage media.Only make example, Fig. 2 shows computing machine 20 to have not removable, non-volatile magnetic medium 241, not removable, the non-volatile memory interface 240 read and write like hard disk drive.Computing machine 210 also can comprise the non-volatile memory interface 250 to reading and writing such as equipment such as disc driver 251, and 251 pairs of equipment are removable such as disk etc., non-volatile media 252 is read and write.In addition, computing machine 210 can comprise the CD drive of reading and writing such as removable, non-volatile CDs 256 such as CD ROM or other optical mediums 255.Other that can in the exemplary operation environment, use be removable/and not removable, volatile/nonvolatile computer storage media includes but not limited to tape cassete, flash card, digital versatile disc, digital recording band, solid-state RAM, solid-state ROM or the like.Hard disk drive 241 passes through not removable memory interface usually, is connected to system bus 221 like interface 240, and disc driver 251 passes through the removable memory interfaces usually with CD drive 255, is connected to system bus 221 like interface 250.
Also driver and related computer-readable storage medium thereof are the storage that computing machine 210 provides computer-readable instruction, data structure, program module and other data shown in figure 2 in the preceding text discussion.For example; Hard disk drive 241 store operation systems 244, application program 245, other program module 246 and routine data 247 are shown; They can be identical with routine data 237 with operating system 234, application program 235, other program module 236, also can be different with them.Here give different labels to operating system 244, application program 245, other program module 246 and routine data 247 and explain that they are different copies at least.The user can be through being connected to user input device, like user's input interface 260 of keyboard 262 and positioning equipment 261 (being often referred to mouse, tracking ball or touch pads) to computing machine 210 input commands and information.Other input equipment (not shown) can comprise microphone, operating rod, game mat, satellite dish, scanner or the like.These are connected to processing unit 220 through the user's input interface 260 that is coupled to system bus 221 usually with other input equipment, but also can be connected with bus structure through other interface, like parallel port, game port or USB (USB).
The display device of monitor 291 or other type also through interface, is connected to system bus 221 like video interface 290.Except that monitor 291, computing machine 210 also can comprise other peripheral output device, and like loudspeaker 297 and printer 296, they connect through output peripheral interface 295.
Computing machine 210 can use one or more remote computers, is connected in the networked environment like the logic of remote computer 280 and operates.Remote computer 280 can be personal computer, server, router, network PC, peer device or other common network node; And generally include many or all are above with respect to computing machine 210 described elements, although in Fig. 2, only show memory storage device 281.The logic that Fig. 2 describes connects and comprises Local Area Network 271 and wide area network (WAN) 273, but also can comprise other network, like wireless network.This type network environment is common in office, enterprise-wide. computer networks, Intranet and the Internet.
When in the lan network environment, using, computing machine 210 is connected to LAN 271 through network interface or adapter 270.When in the WAN network environment, using, computing machine 210 generally includes modulator-demodular unit 272 or is used for through WAN 273, sets up other device of communication like the Internet.Modulator-demodular unit 272 can be internal or external, and it can be connected to system bus 221 through user's input interface 260 or other suitable mechanism.In networked environment, can be stored in the remote memory storage device 281 with respect to computing machine 210 described program modules or its part.As an example but not the limitation, remote application 285 resides on the memory devices 281.Be appreciated that it is exemplary that the network that illustrates connects, and can use other means of between computing machine, setting up communication link.
Refer again to Fig. 1, the stage 1 102 is superphase of sub 1 108 and sub 2 110.Two sub-phase in addition, promptly sub 2a 112 takes place during sub 2 110 with sub 2b 114.Equally, sub 2 110 is superphase of sub 2a 112 and sub 2b 114.Any stage or sub can have sub.Not restriction of the number of plies for the sub in the multilayer phasing model.In addition, in any stage space, must there be at least two stages, but to not restriction of the number of stages on two stages.In addition,, then at least two sub-phase must be arranged in superphase if sub is arranged, but to the not restriction of number of the sub that during any superphase on two sub-phase, takes place.Any set of sub-phases can be during superphase circulation primary or repeatedly.
Stage model 100 shows stage space.Stage space is a limited digraph of confirming effective stage (node of graph) and effective phase transition (figure limit).Therefore, stage space has been confirmed effective sequence of stages.Stage space 100 was defined within on phase set phase 1 102, stage 2 104 and stage 3 106.Stage space 100 also has three phase transitions 118a, 118b and 118c.When phasic change took place when phase transition was represented to share all component softwares in pre-converted stage.
Share a stage during space when component software, these component softwares are parts of phase domain.Phase domain is one group of component software of reaching an agreement to by the public phasing model of moment definition space.For example, all component softwares of agreeing to be had the main stage space constraint of main stage 102,104 and 106 are parts of main phase domain.Thus, with main phase domain in all component softwares of being associated of component software comprise with main stage 102,104 and 106 at least one phase constraint that is associated.
Phase constraint is the effectively static constraint in a certain program context of restriction stage.Especially, constraint can be applied to program segment, thereby asserts that this program segment only carries out during deferring to the stage of this constraint.In one embodiment, phase constraint is written as the attribute in the bracket, such as [Phase 1].This data structure will be explained in more detail following.
Computer environment 300 with the one or more assemblies that occupy one or more phase domain is shown in Fig. 3.The transfer and the foundation of the main stage space of main guidance device 302 controls.All component in this computer environment is the part of main phase domain 300, but can occupy one or more sub-phase domain.For allowing establishing stage territory 300, strategy that program author needs the choice phase space, the execute phase shifts on this stage space and the strategy of handling the message of striding the phase domain border.
Phase domain 300 can be characterized by the multilayer stage space.In various embodiments of the present invention, register to main guidance device 302 such as one or more assemblies such as assemblies 1 304.The software construction of assembly 1 304 expression any kinds comprises component software or method.Component software 304 is restrained to one of stage in the main stage space.
In other embodiments, register to main guidance device 302 such as one or more sub-guidance devices such as sub-guidance device 1 306 and sub-guidance devices 2 308.Sub-guidance device control has one or more other phase domain in one or more different phases space.Thus, phase domain 300 has one or more nested phase domain.Be restrained in the sub-phase space and one or more subs in one or more main stage of main stage space such as assembly 2 310 all components such as grade to 1306 registrations of sub-guidance device.In one embodiment, operate in the single main stage by the sub-phase domain of sub-guidance device control.The operation of sub can repeat to take place during the single main stage.
In various embodiments of the present invention, such as sub-guidance devices such as sub-guidance devices 2 to wait other sub-guidance device registration such as sub-guidance device 3 to create further nested sub-phase domain.In certain embodiments, sub-guidance device 2 308 Control Components 3 312 with operation sub-guidance device 3 314.In other embodiments, control such as assembly 4 316 and above assembly such as assembly 5 318 grades such as the guidance device of sub-guidance device 3 314.Each sub-guidance device may command has the stage space in exclusive stage.Thus, sub-guidance device 1 306 operations first sub-phase space, and sub-guidance device 3 314 operations second sub-phase space.If two phase spaces are not mutual, then stage space is called as orthogonal intersection space.The combination of orthogonal phase spaces can form cartesian phase space, and it can be used for being formed for the phase domain of single product.The bottom groups of phases is the cartesian product of orthogonal phase group, and wherein effectively phase transition also is the cartesian product of effective transfer of orthogonal phase group.
In various embodiments of the present invention, guidance device is a logical timer.The clock that guidance device is similar in the hardware system cycles through each stage.When each phase transition, guidance device changes the stage of all component softwares in the phase domain simultaneously.In one embodiment, any sub-guidance device can change the sub-phase in the sub-phase domain simultaneously.Logical timer is waited for the operation completion that is restrained to the operation in this stage or in being constrained in the sub in this stage, carries out.
An exemplary embodiment of stage space 400 that can be used for main phase domain is shown in Fig. 4.Stage space 400 has three phases.During read request phase 402, request that will read or write data or other software command or the request queue in the software systems are up to getting into next stage.In one embodiment, the method for some non-conflict of only being asked was carried out in next stage, and other method is waited for another stage or next circulation that should the stage.
Update stage 404 will be ordered and request is directed to the appropriate software assembly.In various embodiments of the present invention, during update stage 404, software components fulfill commands or request.In one embodiment, update stage 404 has the sub-phase space 500 that during update stage 404, takes place.An exemplary sub-phase 500 is being explained shown in Fig. 5 and hereinafter.In one embodiment, update stage 404 triggers the sub that is used for data Layer.In other words, any request of data being write realizes in the sub of update stage 404.
Phase III, reaffirm that promptly the stage 406 is instructed and execution untreated other method during update stage 404.In one embodiment, all requests of retrieve data are accomplished during reaffirming the stage 406.For example, in update stage 404, upgraded data after, notify all component softwares that the data change has taken place, and by the software components retrieve data updated notified.In one embodiment, reaffirm stages 406 operator stage space 600.An exemplary embodiment of sub-phase space 600 is shown in Fig. 6 and in following description.
For a change the stage, stage space 400 passes through phase transition.Three phase transitions 408a, 408b and 408c that transfer between the expression three phases 402,404 and 406 is arranged in this exemplary embodiment.As stated, phase transition is to change the stage clock such as guidance device 302 guidance devices such as grade, and is used for the time point that stage of all component softwares changes simultaneously in the phase domain.
Can take place to the component software in the phase domain about current generation or the warning or the notice that shift to the conversion of new stage.In one embodiment, all component softwares of guidance device notification phase.In other embodiments, requesting method requires the stage to guidance device.In various embodiments of the present invention, call announcement is sent out to the one or more component softwares in the phase domain.In one embodiment, call announcement takes place during the current generation or at the place that begins of next stage.In other embodiments, notification procedure is adopted the independent stage.For example, stage space 400 can have three notification phase that are positioned at transfer 408a, 408b and 408c place, is used for the component software in the notification phase territory.
An exemplary sub-phase space 500 of update stage 404 is shown in Fig. 5.Sub 500 is used for data Layer in certain embodiments.In other words, the method that is used for data are write shared data structure is restrained to one of sub of this data sub-phase space 500.In one embodiment, all component softwares of sharing these data agree to submit to change or abort (abort) to change in agreement phase 502.Change is submitted to or abort in submission or abort phase 504.
In another embodiment, agreement phase and submission or abort phase are the subs of " submitting to or abort " sub 504, and sub-phase space 500 has marking phase 502 but not agreement sub-phase 502.Here, data change submit to or abort phase 504 in makes, and use all component softwares of this data to be labeled to be used for upgrading at marking phase 502.Mark one component software is that this component software of signaling is retrieved data updated in suitable later phases sign is set in this component software.In one embodiment, the component software of mark is being reaffirmed retrieve data in the stage 406.In another embodiment, marking phase 502 has two sub-phase: mark sub-phase and final mark sub-phase., use the component software of these data in mark sub-phase, to be labeled here, and in final mark sub-phase retrieve data.
Another exemplary sub-phase space 600 that during reaffirming the stage 406, takes place is shown in Fig. 6 A.Be constrained in an exemplary change in the software construction of sub-phase space 600 shown in Fig. 6 B.Sub-phase space 600 is provided for the sub of plug-and-play operation.Plug and play sub-phase space 600 has two stages: with sub 604 and slotting sub 602.Generally speaking, in slotting sub 602, set up, change or remove the composition and the configuration of component software, but do not carry out any service time of function.Equally, in sub 604, conventional func is used the composition of having set up or the configuration of component software, do not form or the configuration aspect but do not set up, change or remove.
The exemplary embodiment that module reconfigures is shown in Fig. 6 B.In this embodiment, software module has first configuration 606.Import a certain action such as request such as the user after, software module changes second configuration 608 into.Person of skill in the art will appreciate that software module is operated differently in first configuration 606 with in second configuration 608.Thus, reconfigure should do not have method with this software module mutual with the stage during take place under the situation about carrying out.In various embodiments of the present invention, during slotting sub 602, initialization, connection or disconnection software instances also set a property.In certain embodiments, other sub helps the operation of in inserting sub 602, carrying out is sorted.
In one embodiment, insert sub 602 and have other sub.Construct sub-phase 610 is created new software instances through the known class of instantiation, the derivation instance that calls component software or use interface on the existing instance to obtain clone or specialization.Configure sub-phase 612 is added or is removed the connection between the instance.At last, initialize sub-phase 614 sets a property and requires the negotiation between the correct instance that connects.The sub of inserting in the sub 602 can be different with sub presented herein.In addition, also can comprise sub with sub 604.
Conceived other space stage by stage.For example, conceived the sub-phase space that is used for the user interface change.In user interface sub-phase space, invalidate sub-phase can allow to be used to make up the execution of the method for structure.Draw sub-phase is drawn the structure structure then.Can be to other stage space of manipulating of other type, as person of skill in the art will appreciate that.In addition, person of skill in the art will appreciate that the above exemplary stages space that appears can change aspect the type of the number of the number of stage or sub, layer or level and stage or sub to some extent.Thus, the present invention is extendible.In one embodiment, new superphase is superimposed on the existing stage space.In another embodiment, the new stage is added to existing stage space.In also having some embodiment, add the new layer of more subs or sub-phase space to existing stage space.
The exemplary embodiment of data structure 700 of phase constraint of execution with code constraint item is shown in Fig. 7.Data structure 700 is code elements.The code of any kind can have phase constraint.Phase constraint 702 is shown on the method 704.Phase constraint 702 is stage " perform " " execution " with the stage of operational constraints appointment in phase constraint of method 704 in the present embodiment.Thus, method 704 is only carried out during " perform " stage or " perform " sub.
In various embodiments of the present invention, data structure comprises the constraint of a kind of form that depends on component software and performed operation types.In one embodiment, constraint is a call constraint.Call constraint is constrained in specified phases with method call.Thus, the method in other component software or same component software is carried out through limiting these methods and only during specified phases, is started and retrain.In another embodiment, constraint is the constructed fuction constraint.Constructed fuction is the method for a kind of special shape of instantiation component software.Thus, the instantiation of component software is restrained to specified phases, such as what explained for the construct sub-phase among Fig. 6 A 610.In another embodiment, constraint is a reference constraint.Reference constraint constrains component software whole type and such all primitive operations.For example, the reference constraint that docking port applies has limited the connection between the software module, like what explained for the connexon stage 612 among Fig. 6 A.
Constraint is expressed by the phase constraint attribute that can be assigned to any target software assembly in the software code.In various embodiments of the present invention, phase constraint attribute is assigned to whole class and is hereditable.Thus, sub-component is inherited constraint from its parent component.In certain embodiments, pattern applies a plurality of phase constraint attribute to same target stage by stage.Thus, software object retrains through the combination of a plurality of phase constraint.
Each constraint is the constraint to " type " that is associated with the level in specified stage.Thus, specifying the constraint of superphase is the constraint to " superphase ".Specifying the constraint of sub is the constraint to " sub ".To the constraint as the type of sub is to the constraint about the union of all constraints of " superclass type ".The validity with the restriction relation between the inspection different software assembly is used or when moving, used to relation between the constraint of type by compiler.
Implementing constraint can take place when operation or in compile time.In compile time, can check constraint to type.Compiler can contrast about having method call to the constraint of type to have a combined method property rule of the method for the constraint of subtype is checked to the constraint of type and to the constraint of subtype.If the constraint of subtype with identical to the constraint of type or than a little less than it, for example, if the slotting stage 602 has been specified in the constraint of type, and has been specified initialize sub-phase 614 to the constraint of subtype, then this restriction mode is effective.In this embodiment, initialize sub-phase constraint 614 is carried out in slotting sub 602, and is more weak constraint therefore.If to the constraint of subtype with the constraint of type is mutually disjointed, for example,, and opposite slotting sub 602 has been specified in the constraint of subtype if the constraint of type has been specified with sub 604, then restriction mode is invalid.If to about beam intensity of the constraint of subtype comparison type or overlap; For example, if slotting sub 602 has been specified in the constraint of type, and initialize sub-phase 614 has been specified in the constraint of subtype; Then restriction mode is effectively, but must stand a certain dynamic chek.In this embodiment, if the operation in slotting sub 602 and initialize sub-phase 614 of current while of phase domain, then this invocation pattern is effective.Yet, if the territory not in one of two sub-phase, this pattern is invalid.Conceived other legitimacy rule and be attached among the present invention.
Be used for multilayer stage by stage an exemplary embodiment of territory operational computations machine environment method 800 shown in Fig. 8 A and Fig. 8 B.After beginning, the phase one is transferred in jump operation 802, like request stage 402.In one embodiment, the main guidance device of startup such as main guidance device 302.In one embodiment, be restrained to one of main stage of main guidance device registration such as assembly 304 assemblies such as grade.Main guidance device incipient stage clock is to cycle through logical time such as each stage in the stage space of stage space 400.
Confirm that operation 804 confirms whether to be restrained in the main stage first such as any component softwares such as assemblies 304.If a component software is restrained to the phase one, then executable operations 806 is carried out this component software during the phase one.If do not have component software to carry out or component software the term of execution, confirm that then operation 808 determines whether the sub-phase space that during the phase one, takes place, such as sub-phase space 500.If during the phase one, there is not sub-phase space to take place, then this process advances to the jump operation 822 shown in Fig. 8 B through connector 1.
If the sub-phase space that during the phase one, takes place is arranged, then sign operation 810 identifies this sub-phase space and suitable subs.In one embodiment, the sub-guidance device such as sub-guidance device 306 is activated and registers to the main guidance device of the main stage space of control.Sub-guidance device begins the sub logical timer to cycle through each sub in this sub-phase space.Confirm that operation 812 determines whether to be restrained to any component software of current sub, like assembly 312.In one embodiment, the component software that is constrained in sub-phase space is registered to sub-guidance device.Thus, under main phase domain, created nested sub-phase domain.If in being constrained in the sub-phase domain of current sub, component software is arranged, then executable operations 814 is carried out these component softwares during current sub.Confirm that operation 816 determines whether other sub-phase space that during current sub, takes place, such as sub 610,612 and 614.If other sub is arranged, then this process turns back to sign operation 810 to identify other sub.
If there is not other sub-phase space to identify, confirm that then operation 818 determines whether that also remaining any other sub will take place in current sub-phase space.If there is another sub in current sub-phase space, to take place, then the next son stage in the sub-phase space is transferred in jump operation 820.In one embodiment, sub-director waits, all threads in current sub are performed, and transfer to the next son stage then.Then, this process advances to once more and confirms operation 812.If there is not remaining any sub in the current sub-phase space, confirm then operation 818 confirms whether another superphase that will transfer to is arranged in any superphase space.If another superphase is arranged, then next superphase is transferred in jump operation 820.This process (is confirmed the sub in the superphase; Executive software assembly in sub; Transferring to the next son stage accomplishes up to all subs; And transfer to next superphase then) repeat, up to having cycled through all sub-phase space and having needed transfer to next main stage.In case sub-phase loop finished the first main stage, then this process advances to the jump operation 822 shown in Fig. 8 B through connector 1.
Next main stage is transferred in jump operation 822, like update stage 404.In one embodiment, all threads of in the phase one, carrying out of main director waits finish.Then, main guidance device changes the logical stage clock into next stage.In certain embodiments, main guidance device is followed the above transition rule of listing with reference to figure 3.Similar operation was carried out when this process took place according to the phase one that is used to identify sub then.Thus, no longer discuss about some details of sub-phase process here, but person of skill in the art will appreciate that how will be implemented to about the details that the phase one describes in any subsequent process that is constrained in next stage.
Confirm that operation 824 has determined whether that any component software is restrained to the current main stage.If the component software that is restrained to next main stage is arranged, then executable operations 826 is carried out this component software.In each embodiment, these component softwares are to main guidance device registration.These component softwares continue about the current generation and with the main guidance device verification current generation.When the report of phase transition and main guidance device, this territory is now in next main stage the time, and the component software that is constrained in next main stage begins to carry out.
If be not constrained in next main stage component software or restrained component software the term of execution, confirm then operation 828 confirms in the current main stages whether any sub-phase space is arranged.If sub-phase space is arranged, then sign operation 830 identifies these sub-phase space and transfers to first sub.Confirm that operation 832 has determined whether that any component software is constrained in current sub.If the component software that is constrained in current sub is arranged, then executable operations 834 is carried out this component software.
If be not constrained in current sub component software or these component softwares the term of execution, confirm then operation 836 confirms in the current subs whether other sub-phase space is arranged.If other sub-phase space is arranged, then this process turns back to sign operation 830.If there is not other sub-phase space in the current sub, confirm that then operation 838 determines whether next son stage or next superphase in the superphase space in current sub-phase space.If next son stage or superphase are arranged, then next son stage or superphase are transferred in jump operation 840.If under the current main stage, do not have next son stage or superphase, confirm that then operation 842 has determined whether next main stage, such as reaffirming the stage 406.If next main stage is arranged, then this process turns back to jump operation 822.If there is not another main stage in the main stage space, then this process turns back to jump operation 802 through connector 2 and circulates through transferring to incipient stage phase one.
Be further to explain the present invention, be described in the exemplary computer system that multilayer is operated in the territory stage by stage below with reference to Fig. 9.This exemplary computer system is operated individual contact application, such as Microsoft
Outlook
message communicating and collaboration client program.Here, the one or more contact persons in the user interface explicit address book.User interface has master view window 902.
Front view 902 shows the All Contacts and allows the user to select a contact person to check the more details about this contact person.
Computer environment 900 is operated under a stage space.For unrestricted for the purpose of explaining, total system 900 is in 400 times operations of stage space shown in Figure 4.In addition, for illustrative purposes, computer system 900 is current in request stage 402.Thus, computer system 900 allows wherein to receive any operation of request or order.Thus, receive the user command 916 of the detailed view 904 check the contact person and being placed in the formation.In addition, order 918 is sent to the details that address book module 908 is asked with retrieval.Request of data 918 is also lined up.
Main guidance device 302 changes the stage in the computer system domain 900 into update stage 404.Here, order 916 and 918 is sent to selection mode module 906 and address book 908 respectively.During update stage 404, transfer to as above and be used for user interface sub-phase space the change of user interface with reference to what figure 6 explained.Invalidate sub-phase begins.The order 916 that is used for detailed view 904 begins to handle.View in the front view 902 is disabled.For example, the selection to detailed view 904 is set as non-activity.In addition, front view 902 is set as inactive window.Field and user interface item that detailed view 904 usefulness are suitable are created.User interface sub-director is transferred to draw sub-phase then.In the front view 902 contact person's selection is drawn to be revealed as non-activity, for example add bright selection and change color.Front view 902 is plotted as non-activity.For example, front view 902 panes change color to represent that it is non-activity.Detailed view 904 usefulness user interface elements are drawn.Field stays open to receive data from address book module 908.
Main guidance device 302 all in the user interface subspace are invalid accomplishes the stage of reaffirming 406 of transferring to afterwards with the drafting constraint manipulation.During reaffirming the stage 406, carry out data retrieval operation.In one embodiment, data retrieval operation is restrained to data retrieve sub-phase space.Data retrieve sub-phase space has two sub-phase, i.e. mark and finally mark are like what explained with reference to figure 6.Start mark sub-phase.Address book searches needs the software module of Data Update.Mark detailed view 904.The sub-guidance device that is used for data retrieve sub-phase space is transferred to final mark sub-phase.In final mark sub-phase, address book 908 is the required associated person information of retrieval from one of following three data storage: exchange server address book 910, client address book 912 or MSN address book.After retrieving associated person information, address book 908 writes detailed view 904 with associated person information.
After having accomplished all operations that is constrained in the stage of reaffirming 406, main guidance device 302 shifts returns hospitality the stage 402 of asking.Here, user interface takes orders and asks from user input device once more.The user imports the change to associated person information in detailed view 904.For example, the user changes contact person's address.Order 902 sends to address book 904 to change data from detailed view 904.In addition, order 922 is sent to selection mode 906 to upgrade the view of front view 902 and detailed view 904.In this embodiment, order will be lined up, and main guidance device 302 is transferred to update stage 404.Update stage 404 log-on datas are write sub-phase space, such as sub-phase space 500.
In agreement sub-phase 502, address book changes request with data and sends to plurality of data storage 910,912 and 914.One or more copies that comprise the data that change in the detailed view 904 in the data storage.Thus, each data storage that has these data must agree to change data.Thus, during agreement sub-phase 502 voting process takes place.Should change if all data stores agree are submitted to, then agreement beamed back address book 908.Sub-guidance device will change in the stage to be submitted to or abort phase 504.Here, the data change is sent to data storage and is used to and Updates Information.
Simultaneously, during update stage 404, user interface sub-phase space takes place.Selection mode 906 in invalidate sub-phase with the partial invalidity that comprises legacy data in front view 902 and the detailed view 904.In draw sub-phase, repaint front view 902 and detailed view 904, thereby data have for a change kept the space.After all subs were accomplished in update stage 404, phase domain 900 was transferred to the stage of reaffirming 406.
Reaffirming in the stage 406 that other sub-phase space comprises the sub that is used for mark and final mark.Transfer to marking phase, address book 908 is labeled as front view 902 and detailed view 904 data that need change.In final mark sub-phase, the data of change are written into front view 902 and detailed view 904.These changes can take place in the very short time and with meticulous granularity.For example, the stage circulates in the moment of second after the user imports each character and part.Thus, change appears to be immediately and takes place.
How this example shows intrasystem method carried out and applies multilayer and retrain stage by stage.If order and change take place under situation about not having stage by stage, then front view 902 possibly be updated before all data storage change data with detailed view 904.Therefore, the user can be depending on order that view changes data and upgrade the method for user interface view and checks and attempt 904 or mainly attempt the mixing resultant in 902 in detail.
Although, be appreciated that the present invention who defines in the appended claims is not necessarily limited to described concrete structure, action or medium with to the action of architectural feature, method and the present invention that comprised the special-purpose language description of the computer-readable medium of these actions.Person of skill in the art will appreciate that and fall into scope of the present invention and interior other embodiment or the improvement of spirit.Therefore, these concrete structures, action or medium are to come disclosed as the exemplary embodiment that realizes the present invention for required protection.The present invention is limited appended claims.