Abstract:
The invention concerns reduction of a complex model of a system to a simpler model. The invention defines a task postulates a simple sub-system, and inquires whether the sub-system achieves the task. If not, the invention selects components from the complex model, based on functional relationship of the components to the task, adds the components to the simpler sub-system, and again inquires whether the sub-system achieves the task. The addition process is repeated until a sub-system is attained which does achieve the task.

Description:
This is a continuation-in-part of &#34;Timing Verification by Successive Approximation,&#34; in which the inventors are Alur, Kurshan, and Yannakakis, and which was filed on Jun. 29, 1992, and which was assigned Ser. No. 07/906,082 (now U.S. Pat. No. 5,483,470). This application is hereby incorporated by reference. 
     The invention relates to deriving a simple model from a complex model of a system. The simple model is a proper subset of the more complex model, in the sense that, when the simple model succeeds in achieving a defined task; the success implies that the more complex model will also achieve the task. 
    
    
     BACKGROUND OF THE INVENTION 
     The designer of a complex system generally wishes to verify that the system will perform as expected, prior to actually constructing the system. The designer commonly generates a model of the system, in order to simulate operation of the system. 
     Frequently, the model takes the form of a complex state machine. However, a complex state machine can reside in an astronomical number of states, and it is generally unfeasible to examine all states, in the testing process. 
     Example of Large Number of States 
     An illustration of a large number of states can be found in random access memory, RAM (which is not necessarily a state machine, but which illustrates the magnitude of the problem). Consider a RAM which contains one million bytes, giving a total of eight million bits of storage capacity. The number of possible different combinations of stored bits is 2 8 ,000,000, which is an utterly enormous number. The RAM, or even a model of it, cannot be tested by storing all possible bit combinations. 
     Luckily, in the case of RAM, all possible combinations need not necessarily be used. It may be sufficient to write a specific word into every memory location (instead of every possible combination of words), and then read each word, to verify that the words have been stored properly. This process involves one million write operations, plus one million read operations, together with the analysis of each read operation. 
     This simpler test can be done in a reasonable length of time. However, success of this test does not necessarily guarantee perfect functioning of the system. For example, it is possible (but unlikely) that use of a different word will produce errors. This fact will not be detected by use of the original word. As another example, it is possible that storing two different words at adjacent locations may cause an error, and this fact would also not be detected by the original word. 
     Large State Machines 
     State machines also possess large numbers of possible states, and it is not feasible, or even possible, in many cases, to cycle the state machine through all states. Simplifications are done, as by (a) defining tasks which are to be attained, (b) selecting a sub-system of the system, and (c) examining whether the sub-system attains the task. One prior-art approach to simplification, or reduction, is the following. (See F. Balarin and A. Sangiovanni-Vincentelli, &#34;An Iterative Approach to Language Containment,&#34; Lecture Notes in Computer Science (LNCS), 697, pages 29-40  1993!.) 
     Example of Simplification 
     A user begins with a simpler model, and inquires whether the simpler model accomplishes the task. If not, then the user randomly adds one or more components to the model, and repeats the inquiry. At some point, after a sufficient number of components have been added, the simpler model will probably achieve the task. 
     However, this approach suffers two disadvantages. One lies in the random approach to expansion of the simple model. There is no assurance that addition of a randomly selected component will increase the likelihood of achievement of the task. Thus, time will probably be wasted in testing non-relevant subsystems, en route to a successful sub-system. 
     A second is that, the final sub-system probably contains non-relevant components, because of the random addition process. Thus, the model, while perhaps smaller than the larger model which it intended to replace, is nevertheless probably larger than necessary. 
     SUMMARY OF THE INVENTION 
     In one form of the invention, a model of a system is reduced to a simpler model by the steps of 
     a) defining a task; 
     b) defining a subsystem; and 
     c) successively expanding the sub-system, based on functional relationships between the subsystem and components not included in the sub-system, until the task is achieved. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1.1 illustrates ascending level of complexity in different model checking processes. 
     FIG. 1.2 illustrates a data-flow diagram for a hypothetical traffic signal. 
     FIG. 1.3 illustrates state transition diagrams for the data-flow diagram of FIG. 1.2 
     FIG. 1.4 illustrates an omega-automaton which defines the task &#34;no cars collide.&#34; 
     FIG. 1.5 illustrates an automaton which models the requirement that all cars on Avenue A eventually succeed in crossing the intersection. 
     FIG. 1.5A illustrates a reduced state model. 
     FIG. 1.5B illustrates reduced state space of a component. 
     FIG. 1.5C illustrates application of state minimization to the model of FIG. 1.5B. 
     FIG. 1.5D illustrates an error track. 
     FIG. 1.5E illustrates two automata. 
     FIG. 2.1 illustrates classical dynamic representation of an automaton transition structure. 
     FIG. 2.1A illustrates conditions for transitions. 
     FIG. 2.2 is a static representation of an automata transition structure, in terms of Boolean predicates. 
     FIG. 2.3 illustrates parallel composition of the transition structures M and M&#39;. 
     FIG. 2.4 is a matrix representation of a transition structure. 
     FIG. 2.5 illustrates that a Boolean algebra may be represented as an N-cube. 
     FIG. 4.1A illustrates abstraction of detailed events. 
     FIG. 5.1 illustrates a shift register. 
     FIG. 5.2 illustrates a deterministic binary counter. 
     FIG. 5.3 illustrates change of language accepted by an input. 
     FIG. 6.1A illustrates a state diagram for use with Example 6.1.9 
     FIG. 6.1B illustrates a state diagram for use with Example 6.2.47. 
     FIG. 6.1C illustrates a process involved in a proof of Theorem 6.2.49. 
     FIG. 6.1D illustrates paths in state space along recur edges. 
     FIG. 7.1 illustrates an s/r model. 
     FIG. 7.2 illustrates the concept of delay. 
     FIG. 7.3 illustrates a canonical pair of states. 
     FIG. 7.4 illustrates a two-level signal alternating between x 0  and x 1 . 
     FIGS. 7.5 and 7.6 illustrate lockup-free Moore processes. 
     FIGS. 7.6A and 7.6B illustrate asynchronous equivalence. 
     FIG. 8.1 illustrate two processes. 
     FIG. 8.2 illustrates graphically the situation described in Theorem 8.3.16. 
     FIG. 8.2A illustrates relationships between different languages. 
     FIGS. 8.3 and 8.4 illustrate a development methodology for use with the invention. 
     FIG. 8.4A illustrates setting of a bit each time a recur edge is crossed, and unsetting each time a non-recur edge is crossed. 
     FIG. 8.5 illustrates graphically a situation involved in the proof of Theorem 8.10.6. 
     FIG. 8.6 illustrates reduction of a graph. 
     FIG. 8.6A defines the task &#34;All cars on each road eventually get through the intersection.&#34; 
     FIG. 8.6B illustrates reduction of a circular queue. 
     FIGS. 9-11 contain flow charts which illustrate logic implemented by one form of the invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Appendices A (incorporated by reference) and B (attached hereto) contain technical information sufficient to explain how to implement the invention using a programmable digital computer. A highly simplified view of one form of the invention can be given as follows. 
     Assume that the overall system is an automobile. However, suppose that the task of interest is reception of radio broadcasts. To examine whether the automobile achieves the task, the radio sub-system is to be isolated from the overall automobile. 
     To a knowledgeable engineer, this particular isolation is straightforward: the radio subsystem contains a list of elements such as the following: 
     1. power supply (ie, the car battery), 
     2. power cables, 
     3. antenna, 
     4. antenna cable, and 
     5. the radio itself. 
     When these are all connected properly, the radio will function. 
     In the general case, however, such a list is not available, because a minimal set of components (such as the five components listed above) required to perform the defined task is not known. The sub-system must be derived, or abstracted, from the larger system. The invention assists this derivation. One simplified view of the procedure taken by the invention is the following. 
     Simplified Procedure 
     Each component, such as the five given in the list above, is described by a model, or specification of operational characteristics. The models may be more, or less, complex, depending on the intentions of the designer. The models describe the relevant behavior of their respective components, generally in terms of input-output relations. As examples, models for the five components given would contain information such as the following. 
     1. Power supply. Inputs: none. Output: 13.5 volts. Maximum current, 100 amps. 
     The power supply model may be more complex. It may contain a function which describes output current vs. output voltage. It may also contain input requirements, such as (a) specific temperatures needed, (b) a specified amount of electrolyte needed, having a stated specific gravity or stated chemical composition, and so on. Again, the degree of complexity of each specification will depend on the circumstances. 
     2. Power cables. Input: power supply. Output: voltage of power supply, minus I-squared-R losses due to current drawn. 
     3. Antenna. Input requirements: access to ambient rf radiation. Output: rf signal. 
     4. Antenna cable. Input: antenna output. Output: rf signal, minus attenuation. More complicated specifications will add noise to the output. 
     5. Radio. Input: antenna cable and power cables. Output: sound of selected channel. 
     The invention begins by selecting a component known to be involved in the sub-system to be developed, such as the radio itself, item number 5. The invention attempts to cause the radio to operate, by attempting to simulate the radio. However, the radio fails to operate, because, as the radio&#39;s specification indicate, power cables and antenna cables are required to provide inputs. 
     Next, the invention adds these cables to the model, tries to get the radio to operate, but fails again. The invention then examines the specification of the added components. For the antenna cable, the invention finds that antenna output is required as an input. Similarly, for the power cables, the invention learns that the battery is required as an input. The invention adds the battery and the antenna to the model. 
     Now, the invention tries to operate the radio, and succeeds. A reduced model of has been attained. Chapter 8.4 of Appendix A, incorporated by reference entitled &#34;Automatic Localization Reduction,&#34; contains greater detail on the process of reduction, and provides a basis for writing computer code to implement the reduction process. Appendix B, entitled &#34;Task Manager/Reduction Assistant,&#34; is a specification which can also be used as a basis for code development. 
     Significant Features 
     1. Derivation of the sub-system is not random, but systematic. For example, when the radio in isolation was found inoperative, the invention sought dependencies, and added the components upon which the radio depended, such as the cables described above. 
     When the radio still failed, the invention sought further dependencies, namely, those of the added components (the cables), and so on. The invention did not add clearly irrelevant components, such as a spare tire, because the component specifications do not express a dependency upon a spare tire. 
     An extremely simple example of dependency is the following: assume that the output Y of a component Y is described by the following expression, which would be contained in the specification for Y: 
     
         Y=MX+B 
    
     Y clearly depends upon M, X, and B. Assume that M and B are constants, and that the functional specification of Y contains the values for M and B, but not for X, because X is the output of another component, and is variable. 
     When the invention attempts to operate Y in isolation, failure will result, because no value of X has been used as input. Upon failure, the invention will examine the specification of Y, learn that X is missing, and add a component which supplies X. The invention ascertained the dependence on X, and added X to the sub-system. This example illustrates one view of a systematic approach to expanding the model, or sub-system. 
     2. Dependency will, of course, depend on the particular details of the specifications used. For example, returning to the automobile example, a particular radio&#39;s specification may require exactly 12.0 volts: the radio depends on 12.0 volts. An automobile battery may supply a higher voltage, such as 13.5 volts. A voltage regulator may be required to reduce the 13.5 volts to 12.0 volts. 
     In this case, the radio has a dependency upon the voltage regulator, which, in turn, depends on the battery. In developing the sub-system, the invention would (eventually) include the voltage regulator, based on the dependencies. 
     In contrast, a battery which lacks the 12.0-volt requirement will not possess this dependency, and would require no voltage regulator. 
     Dependency is one type of functional relation existing between components. 
     Conclusion 
     The textbook entitled &#34;Computer-Aided Verification of Coordinating Processes.&#34; (Kurshan, R. P.; Princeton University Press 1994) is incorporated by reference. Appendix B is a specification which can be used by a programmer to develop code for performing the reduction of a system model. Appendix B is hereby incorporated by attachment. 
     U.S. Pat. No. 5,163,016, issued to Har&#39;El et al. on Nov. 10, 1992, describes a development apparatus suitable for use with the present invention. This patent is hereby incorporated by reference. 
     Numerous substitutions and modifications can be undertaken without departing from the true spirit and scope of the invention. What is desired to be secured by Letters Patent is the invention as defined in the following claims. 
     
         __________________________________________________________________________Appendix BTASK MANAGER/REDUCTION ASSISTANT__________________________________________________________________________The Task Manager keeps track of the status of tasks, including whichonesneed to be re-verified on account of changes in the model.The Reduction Assistant implements an &#34;automated reduction&#34; algorithm,based upon successive approximations. Given a system specification Sand a task T, the objective is to test the language containmentL(S) &lt; L(T), given that S is too large to compute explicitly, eitherin terms of a reached state table or a bdd. Two models are defined forthis purpose: an optimistic (small) model M.sub.-- o and a pessimistic(large)model M.sub.-- p, with L(S) &lt; L(M.sub.-- p) &lt; L(M.sub.-- o). Cospan willfirst testL(M.sub.-- o) &lt; L(T). If that succeeds, then L(S) &lt; L(T): &#34;Taskperformed&#34;. Else,the Reduction Assistant will take the error track E from the run M.sub.--oxTand test L(E) &lt; L(M.sub.-- p), ie test if E extends to M.sub.-- p. Ifyes, E is a &#34;real&#34;error and it is reported: &#34;Task failed&#34;. (It may happen that L(E) &lt;L(M.sub.-- p)is true, whereas L(E) &lt; L(S) is false-- in that case, the user will needto redefine M.sub.-- p in order to falsify L(E) &lt; L(M.sub.-- p), the ideabeing thattesting L(E) &lt; L(S) in cospan is infeasible.) If no, then E is only anartifact of the (overly) optimistic model M.sub.-- o. In this case, abigger(less optimistic) M.sub.-- o is generated, for which L(E) &lt; L(M.sub.-- o)is false.This procedure is iterated until either L(S) &lt; L(T) is verified,falsifiedby a real error track, or the test runs out of memory. (With unlimitedmemory, one of the first two will occur in a finite number of steps.)Both the Manager and the Assistant will have an X-window user interface.However, the underlying algorithms will be implemented by runs ofcospan.All information will be passed through the interface to ascii files;thesefiles will be read by cospan. This creates a clean interface between theX-window platform and cospan: the X-window routines need know nothing ofcospan, and cospan need know nothing of the X-window routines. (Theyeachknow only the interface file formats.)The algorithms on the cospan-side consist of 3 principal routines:  *Reduction  *Feasibility Test  *Make TaskThe Reduction routine takes lists of variables and proc&#39;s as input, andrunsthe model specified in the given *.sr file, reduced according to theinputlists. This is the routine which creates the M.sub.-- o and M.sub.-- pmodels.The Feasibility Test performs the L(E) &lt; L(M.sub.-- p) test and, if thetest fails,generates a new list to define a new M.sub.-- o.The Make Task routine uses SCCS to check if a task needs to be re-run onaccount of a change in the model.The Reduction and Feasibility Test routines both run off an ascii fileoftype &#34;Reduction File&#34;; the Make Task routine runs off an ascii file oftype &#34;Tasks Status File&#34;.REDUCTIONThe models M.sub.-- o and M.sub.-- p will be defined by respective pairsof &#34;path lists&#34; ofvariable-path-name prefixes (ie, lists of proc&#39;s and var&#39;s) , each listreferring to the basic *.sr model. A pair of path lists is of the form  p1 p2 ... pn ; q1 ... qrnThe list p1 p2 ... pn is the &#34;root list&#34;; the *list q1 ... qm is the&#34;free list&#34;.Two such lists together will define a reduced model. Loosely speaking,allvariables defined by the free list are freed in the reduced model, andallvariables which the &#34;root&#34; variables don&#39;t care about are &#34;pruned&#34; away.A path name on each list may be &#34;complete&#34;: naming a variable, or it maybe aprefix of a variable, naming a proc. The &#34;completion&#34; of a path prefix(ie,proc) p, is the set of all variables for which p is a prefix (eg, p.#,p.a.$).The completion of a path list is the completion of its entries.(We must consider state variables in the free list, as they may beimportedby monitors in the root list.)Often, we will refer to the &#34;free list&#34; or the &#34;root list&#34; when in factwe mean their respective completions, but  hopefully! only when thiswillcreate no ambiguity.Define the variable dependency graph on the set of all variables ofthe original *.sr model: for variables x, y, there is a directed edgex-&gt;y if y is dependent upon x. The dependency sub-graph relative to afree listis formed from the dependency graph by removing every edge which enters anodein the completion of the free list which is not of type &#39;integer&#39;.Say a variable is &#34;connected&#34; to the root list if there is a directedpath fromit to a variable in the completion of the root list, in the dependencysub-graph relative to the free list.The &#34;pruning&#34; step:In forming the reduced model, we: * free all variables in the free list except those of type &#39;integer&#39;,and * remove all variables which neither are in the completion of the rootlist nor are connected to the root list.The next step is &#34;variable-resizing&#34;:after the freeing/pruning step, for each variable x, check if (asidefroma possibe free assignment of x or import declaration):  i) every appearence of x is of the form:    x=constant   or    x-=constant   or    (x: constant.sub.-- list)  and  ii) if x is the unique selvar of a proc A, then every appearence of   &#39;A:&#39; is of the form:    (A: constant.sub.-- list)  and  iii) the union of the constant&#39;s and constant.sub.-- list&#39;s of i) andii)   omits at least 2 elements in the range of x; so, this excludes &#39;-&gt;x&#39;, &#39;x&lt;5&#39; and &#39;x+1=5&#39;, for example!if i-iii hold, and % is the 1st value in the range of x omitted underiii),redefine the range of x to be the union of iii) and the value %: say,new.sub.-- range.If x is freed, then its free assignment is relative to &#39;new.sub.--range&#39;. Otherwise,x is not freed; in this case, suppose F is the (logical) expression towhich xis assigned (ie, the assignment of x is equivalent to x:=F or x -&gt;F);then redefine the assignment of x as:  x:= F  ? (F: new.sub.-- range) | %(or x-&gt; F ? .., accordingly). This re-definition of the assignmentof x is important on account of the reducing step, described next.  Italsomay be worthwhile in case of a bdd run, when the size of x is reduced byatleast 1 bit.!The &#34;reducing&#34; step:this is state space reduction, which will be implemented by the cospan&#39;reduce&#39;code. A &#34;reduce list&#34; is created after the resizing step, consisting ofeachprocess containing an unfreed variable which has been resized.Cospan will run on such a &#34;reduce list&#34;, the same as if the key word&#39;reduce&#39;had been inserted before each proc on the list. The user will probablywant tointervene in this step, as &#39;reduce&#39; is a computation-intensive step, andeach application may or may not be worth the trouble. Furthermore, the&#34;reducelist&#34; may contain nested proc&#39;s; the user will have to decide whether todo  reduce A.A; reduce A.Bor merely  reduce ATherefore, this Reduction algorithm will create a &#34;proposed reducelist&#34;:  ?R: A(3) (A.A(6) A.B(4) (A.B.A(9) A.B.B(3))) B (6)listing all processes containing a top-level resized unfreed variable,which the user edits to form the actual &#34;reduce list&#34;:  ?R: A.A A.B.A BEach number in &#39;( )&#39; is the product of the numbers of excluded values foreachresized variable at the given level.REDUCTION FILE FORMATA new run-time option, -R, is introduced to cospan; &#39;cospan -R ..&#39; takes*.sr files (with the semantics that the 2nd is concatenated to the end ofthefirst). The first gives the system model S, while the second gives the&#34;task&#34;T. The physical separation of S and T is important for several of theroutines.One &#34;reduction file&#34; is associated with each respective task. The formatis asfollows: |M.sub.-- p: tab-separated path-list ; tab-separated path-list--------- |Vars tab-separated variable list |Vars.sub.-- c tab-separated variable list |Vars.sub.-- r tab-separated variable list |Vars.sub.-- f tab-separated variable list |M.sub.-- o: tab-separated path-list |S: status (see below; placement not unique) |OP: &#39;cospan -R ..&#39; additional run-time options ?R: proposed reduce list |R: reduce list |VS: SCCS version number of &lt;system.sub.-- name&gt;.sr-- the &#34;system&#34; modelS |VT: creation date of task.sr-- the *.sr file containing the task T date stderr from cospan run |S: statusCall the 1st line the &#34;pessimistic list&#34;; call the succeeding lines an&#34;optimistic sub-table&#34;. The reduction file may consist of a pessimisticlist,followed by any number of optimistic sub-tables, the last such being the&#34;active&#34; optimistic sub-table. The &#34;optimistic list&#34; is the list  1.sub.-- 11 ; 1.sub.-- 12 1.sub.-- 2formed from the pessimistic list |M.sub.-- P: 1.sub.-- 11 ; 1.sub.-- 12and the line |M.sub.-- o: 1.sub.-- 2calculated from the 4 &#39;|Vars&#39; lines of the active optimistic sub-table.Thus, the root list is defined both for the optimistic and pessimisticmodels inthe first path list of the |M.sub.-- p line; the free list of theoptimistic model isthe union of the free list of the |M.sub.-- P line and the |M.sub.-- oline.REDUCTION (CONT.)The Reduction routine will be run as follows. The user interfaceexecutes: cospan -R&lt;reduction.sub.-- file&gt; &lt;|OP options&gt; system.sr -DtoK task.srAll cospan run-time options are taken from the &#39;|OP:&#39; directive in theactivesub-table ONLY. There are 3 cases of this execution:Case 1:The active optimistic sub-table contains neither an &#39;?R&#34;&#39; directive,nor an &#39;|R:&#39; directive. In this case, if there is no |M.sub.-- o list,cospan computesit according to the algorithm described below, and stops;otherwise, the |M.sub.-- o, |S and |OP lists exist, in which case cospancomputesthe &#34;optimistic list&#34; (from M.sub.-- p&amp;M.sub.-- o) and generates theparse tree which resultsfrom performing the freeing, pruning and resizing steps on the model(system.sr&amp;task.sr)NB: As a locvar or even a stvar may be on the free list, we need tosupportfreeing of these variable types.  However, &#39;free proc p&#39; still will freeonly the top-level selvar&#39;s of p.!If a non-empty &#34;proposed reduce list&#34; is computed, it isappended to &#39;reduction.sub.-- file&#39; as a &#39;?R:&#39; directive, and the routinestops.Otherwise, C-code/bdd generation followed by analysis proceeds asalways.Case 2:If the active sub-table contains an &#39;|R:&#39; directive, then &#39;reduce&#39; tokensareinserted into the parse tree as directed by the active &#39;|R:&#39; directive,and therun continues as always from that parse tree. (In the case of one or morereducetokens, one run of cospan is required for each token to do the reduction,plusa final run to do the analysis on the reduced model. This iterationprobablyshould be automated here. However, in developing the Reduction routine,the &#39;|R:&#39; directive probably should be ignored for now.)Case 3:If there is a &#39;?R:&#39; but no &#39;|R:&#39;, the run returns an error.The date/version-numbers/stderr from the cospan run are appended to the&#39;reduction.sub.-- file&#39; (the stderr continues to come out as stderr, aswell)A new &#34;status&#34; field &#39;|S:&#39; is appended by cospan, according to thefollowing: check iteration N - N=1 entered by &#39;maketask&#39;; N&gt;1 by Feasibilityroutine ready iteration N - entered by Feasibility (or user, from &#39;check&#39;) redo - equivalent to &#39;ready iteration 1&#39;; &#39;maketask&#39; &#34;stale&#34; indication running iteration N - set from &#39;ready iteration N&#39; (or &#39;redo&#39; with N=1) feasibility check N - set from previous status upon &#34;Task failed&#34; Task performed - set from &#39;running iteration N&#39; upon &#34;Task performed&#34; user-terminated iteration N - set from &#39;running iteration N&#39; by &#34;kill&#34; out-of-memory iteration N (step) - set from &#39;running/feas .. N&#39;  step = Compilation or Verification or Feasibility check error - set by Feasibility routine to indicate a valid error track *.TFEASIBILITY TESTThis routine tests L(E) &lt; L(M.sub.-- p) for a *.T file E and the modelgeneratedfrom the pessimistic list, invoked by:  cospan -z -R&lt;reduction.sub.-- file&gt; &lt;|OP options&gt; system.sr -DtoKtask.sr  cospan -z0 -R&lt;reduction.sub.-- file&gt; &lt;|OP options&gt; system.sr -DtoKtask.srAssumes existence of error track E: &#39;system.T&#39; in current directory.Option -z0 means &#34;don&#39;t iterate&#39; (see below)Generates parse tree from pessimistic list, by pruning and resizingvariables,as with the Reduction routine (but without the reduce step). Normalcospanrun of system.sr (S) together with task task.sr (T) (ie, SxT), exceptSxT is run together with E, which is treated as a process with statetransitions enabled by &#39;true&#39; from its i-th (vector) state to its(i+1)-st(vector) state, for all i up to the length of E in the case of a &#34;finite&#34;E,or including the additional back-edge, in the case of a &#34;Bad cycle&#34; E.During the run, which is a cross between aMealy model (-m) run and a sthom run, we check that each &#34;next-state&#34; ofSxTmatches the corresponding next-state of E (ie, consider the statecomponentsof E in SxT: their respective values in E are checked for a match withthosein SxT for each next-state of SxT and the (unique) next-state of E). Ifthereis no match, truncate that transition. A state of SxTxE with *every*exitingtransition thus truncated is called a &#34;lock-up&#34;. For each lock-up stateV,for each selection valid at V, let v be the 1st state component of Ewhichfails to have its next-state value match the next-state value of v in E,say v=v.sub.-- {i+1}. If v=v.sub.-- i is the current-state value of v(ie, value of v in V),look at the variables which enable the transition v.sub.-- i -&gt; v.sub.--{i+1}. Call theseVars(V). (We should compute Vars(V) during the crank, setting Vars(V)=0at theend of crank, if it turns out that V is not a lock-up.)  Note thatVars(V)will consist only of variables of M.sub.-- o (free or otherwise).!Here&#39;s how to compute Vars(V):For each selection (in SxT) at V, as we crank out the stvar&#39;s of SxT(case RESOLVE),for each stvar v which is a component of E, check if the next-state (or,one ofthe next-states, in case of a &#39;n&#39; run) matches the required next-statevaluein E. If yes, continue; if not, stop case RESOLVE for that selection, andadd toVars(V) some variables which collectively disable the transition fromthecurrent value of v to the required next value of v. If this particularset ofvariables is too hard to compute, get as close as practical (too manyvariablesis ok; too few is not allowed); for example, all variables upon which visdependent gives a list, when a finer list is impractical. Add thesevariablesto Vars (V), and pick the next selvar (valid at V) to crank. Continuelike thisuntil all selvars are cranked. If for any selection, the requirednext-statematch occurs, set Vars(V)=0, and set a flag to ensure that it stays =0for therest of the selvar cranks (but, continue to crank all selections from V,asthere may be other states with next-state matches: we want them all).There are 3 possible conclusions to the run of SxTxE:Case 1:If E is a &#34;finite&#34; error track (&#34;No transition&#34;, &#34;Lockup&#34;, etc), wereachthe last state of E in SxTxE, and reproduce the same error, or anothererror which results in the same finite error track, or an infinte errortrack consisting of a &#34;Bad cycle&#34; self-loop at the final state of E;or, E is an &#34;infinite&#34; error track (&#34;Bad cycle&#34;), and we reach the endofE, and then can continue to cycle in the Post mortem cycle of E,eventuallyreaching the same state of SxTxE twice AND cospan reports the result inSxTxE as a &#34;Bad cycle&#34;, (ie, not excepted by a cyset/recur in SxT).In either. case, the result is a real error.We report &#34;Task failed&#34;, set the &#39;|S:&#39; status field to &#34;error&#34; andover-writethe old *.T file with the new error track (of SxT).  The old track willbea projection of the new track to the variables of E, after possiblyconcatinating to E 0 or more copies of its Post mortem cycle.! We dontcareabout any of the Vars* sets, as the algorithm terminates with the findingofthis real error. Thus, as soon as this case applies (if at all), westop.Case 2:The conditions defining Case 1 fail, meaning that E is an artifact oftheoptimistic model M.sub.-- o. This situation can arise for severalreasons,which we separate into Case 2 and Case 3. One reason Case 1 may fail isthatwe fail to reach the end of the E track (for all possible init matches ofEin S, and all possible selections along the path of E).In this case, let Vars = †/Vars(V) (union over all lock-ups V) andlet Vars.sub.-- fbe the elements of Vars which are in the active |M.sub.-- o (free-)list. Note: there is a possibility that Vars.sub.-- f is empty.!Set Vars.sub.-- c=Vars.sub.-- r=0.Case 3:Suppose Cases 1 and 2 don&#39;t apply.In case E itself is &#34;infinite&#34; (ie, a &#34;Bad cycle&#34; track) and we reachthelast state of E, with one or more additional transitions through the&#39;Post mortem&#39; loop of E, arriving finally twice to the same state ofSxTxE, butcospan reports the result in SxTxE as &#34;Task performed&#34;, then look at thecyset check at the end of the run: each SCC must have been contained insome cyset of SxT. (This applies for each match of init&#39;s in S, and eachbranch in SxTxE which follows E, so there may be several.)Each such cyset must have involved stvar&#39;s which are NOTcomponents of E. Let Vars.sub.-- c be the set of all these.Furthermore, let Vars.sub.-- r be the set of stvar&#39;s crossing recursafter the&#39;Post Mortem&#39; point of E. (These will be stvar&#39;s of S not in E. Ideally,weshould exclude from Vars.sub.-- r the cases which arise from a transitionwhoseend-points are both in cyset&#39;s; if implementing this is problematic, wecanignore this refinement.) These stvar&#39;s arising from recur&#39;s aretreated the same as the stvar&#39;s in Vars.sub.-- c, defining the setVars.sub.-- r.If we don&#39;t ever arrive to the same state twice, for any init&#39;s match(although we&#39;ve reached or passed the end of E), then we are in the samelogical condition as Case 2, and we proceed analogously.In all these possibilities, we define Vars and Vars.sub.-- f as in CaseThus, in Case 3, we have Vars.sub.-- f, Vars.sub.-- c and Vars.sub.-- rdefined.(Note that Case 3 includes the possibility that some embeddings of E inSxTxE fall under Case 2; there may be several embeddings of E, definingrepective Vars.sub.-- c and Vars.sub.-- r; the definitions of all theVars.sub.-- * mustaccumulate over these respective embeddings.) |NB: We must never combine states inside a cyset with ones oustide, or |collapse together states within a cyset (except in the special casethat |they all are equivalent), although we may remove any cyset altogether;the |reason is that a reduction must be conservative by construction,increasing |behaviors, whereas collapsing states within a cyset or adding to acyset |additional states is non-conservative, decreasing behaviors. Thus, ifany |stvar of a high-level cyset is pruned or freed, the entire cyset which |contains it must be removed.Append to the reduction.sub.-- file a separator &#39;-----&#39;, followed by thedefinitionsof Vars, Vars.sub.-- c, Vars.sub.-- r and Vars.sub.-- f.COMPUTING |M.sub.-- o LINEWe need to define a new (more pessimistic) optimistic model M.sub.-- o.Definition of &#34;disconnect&#34;:Let x be any variable. A variable d is a &#34;disconnect&#34; of x if every pathin the dependency graph from d to x goes through a stvar not equal to d.A disconnect dof x is &#34;minimal&#34; if some path from d to x does not pass through anotherdisconnect of x.Compute a new |M.sub.-- o free list L&#39; as follows from the previous|M.sub.-- o list Land Vars.sub.-- f, Vars.sub.-- c, Vars.sub.-- r:Case 1:Vars.sub.-- f non-empty.Form L&#39; from L by removing from L each element of Vars.sub.-- f, and addto L&#39; eachdisconnect d of an element of Vars.sub.-- f, unless d is in the root listof |M.sub.-- p. Since the pruning step will remove all non-minimal disconnects, theyneednot be added to L&#39;.!Case 2:Vars.sub.-- f = 0, Vars.sub.-- c and/or Vars.sub.-- r non-empty.Let Vars.sub.-- cc be the set of elements Vars.sub.-- c and Vars.sub.-- rwhich are closest(in the dependency graph) to an element of L.Set Vars.sub.-- f to be the set of elements v of L for whichthere is a path in the dependency graph from an element of Vars.sub.-- ccto v.Apply case 1. This may not bring the elements of Vars.sub.-- cc into the M.sub.-- omodel, althoughtypically it will.!Case 3: Case 4:Vars.sub.-- f = 0, Vars.sub.-- c = 0, Vars.sub.-- r =0.If (Case 3:) Vars is non-empty and there is a unique variable inL closest to Vars (in the dependency graph), or (Case 4:)there is more than one variable in L closest to Vars (ifVars = 0, we consider all the variables of L to be closestto Vars). Set Vars.sub.-- f to be these, and apply Case 1.In each case, this gives the new &#39;|M.sub.-- o:&#39; list. In cases 1,2,3append the status field &#39;|S:&#39; as &#34;ready iteration N+1&#34;. In case 4,appendthe status field &#39;|S:&#39; as &#34;check iteration N+1&#34;. This gives the user anopportunity to edit the &#39;|M.sub.-- o:&#39; list. (Note: as a fail-safemechanism, we should return an (internal) error and stop, if N &gt; numberofvariables in M.sub.-- p model, a logical impossibility.).Copy the previous |OP line.In cases 1,2,3, we re-run Reduction on the new &#34;reduction file&#34; (the -z0optionmeans to stop at this point).MAKE TASKThis program sets up the Reduction files and keeps their status current.It presumes/maintains the following file system:The root subdirectory for system &#39;system&#39; contains the system-modelfiles  system.sub.-- i. srfor each i, where i is an integer defining the abstraction level of themodel. These should be in the same directory so we can hom:sys.sub.-- i.sr -&gt;sys.sub.-- {i-1}.sr!For each i there is a subdirectory  ./tasks/Lvicontaining for each task its S/R spec task.sr and its &#34;reduction file&#34;task.rf, as well as the general &#34;tasks status&#34; file  ./tasks/Lvi/taskstat Later, we will implement the Simulation Manager, which Will run offfiles  ./cuts/Lvi/toKin a very similar fashion, except in this case, the Simulation file(analogousto the Reduction file) will also allow reduction of non-determinism viaelimination of variable values).!Additionally, there are the SCCS files:  ./sccs/s.system.sub.-- i.srEach file has an SCCS Version number of the form M.N; the file isshippedfrom central distribution as M.0 and then the sub-index N is incrementedby each user. Periodically, user copies are merged centrally, andreshippedwith incremented M.The command  maketask idoes the following:*does a &#34;make delta&#34; on system.sub.-- i.sr, updating ./sccs/s.system.sub.-- i.sr*creates default Reduction file ./tasks/Lvi/task.rfwhere none exists, setting the pessimistic model M.sub.-- p to &#34;all&#34; (setthe rootlist to be all variables in the task; empty free list) and theoptimisticmodel M.sub.-- o to have the free list consisting of all (minimal)disconnects ofthe root list which are not themselves in the root list.Sets status to &#39;check iteration 1&#39;. Adds the version number ofsystem.sub.-- i.sr andthe creation date of .tasks/Lvi/task.sr in the |VS and |VT lines,respectively.*checks &#34;currency&#34; of each task with outdated version/creation fields,asfollows:if the creation of the task doesn&#39;t match that in the |VT line, the taskis&#34;stale&#34;.Generate the C-code for the optimistic model for current versionnumber and *.rf version number; &#39;diff&#39; the two files; if there&#39;s a diff,the old.sub.-- version is &#34;stale&#34;.Update the version fields; where version check indicates a stale &#34;Taskperformed&#34;, change status to &#39;redo&#39;; for other stale cases, changestatusto &#39;check iteration 1&#39;.*updates &#39;taskstat&#39; file, which contains, for each task &#39;task&#39;,the following line, taken from the &#39;./tasks/Lvi/task.sr&#39; file: task status run.sub.-- time.sub.-- options Version(system.sub.-- i.sr)Version(Lvi/task.sr)__________________________________________________________________________