Apparatus and method for software system management using second-order logic5640567Abstract A software system manager to achieve second-order logical management of a software system model is described. The system relies upon a second-order logic system description that uses variable functors with specified import predicate arguments and export predicates. The second-order logical system description includes a second-order system model, a second-order rule set, and a second-order operation module. The second-order system model defines a set of existing program files, the second-order rule set defines a set of operations that can be performed on the existing program files, and the second-order operation module specifies an operation to be executed by the secondorder rule set on the set of existing program files. The second-order logic system description is used to generate a set of system construction commands. The system construction commands specify the commands necessary to transform the existing program files into intermediate object files that are used to produce an executable program. Claims I claim: Description BRIEF DESCRITPION OF THE INVENTION
______________________________________
(1) module system.sub.-- model( :file, refers.sub.-- to ) {
(2) file( t1 ).
(3) file( t2 ).
(4) file( t3 ).
(5) file( t4 ).
(6) file( t5 ).
(7) refers.sub.-- to( t1, t2 ).
(8) refers.sub.-- to( t2, t4 ).
(9) refers.sub.-- to (t4 ,t4 ).
(10) refers.sub.-- to( t1, t3 ).
(11) refers.sub.-- to( t3, t4 ).
(12) refers.sub.-- to( t3, t5 ). }
______________________________________
Note that in line 1 the module system.sub.-- model does not have any import predicate arguments, but has export predicate arguments "file" and "refers.sub.-- to". Lines 2 through 6 define five different files (t1, t2, t3, t4, t5), and lines 7 through 12 define relations between those files. For example, line 7 indicates that file t1 produces file t2. Line 8 indicates that file t2 produces file t4. FIG. 8 illustrates the relationships defined in lines 7 through 12. The following code is an example of a second-order inference structure.
______________________________________
(13) module rule.sub.-- set( node, edge:path ) {
(14) path( X, X ) <- node( X ).
(15) path( X, Z ) <- edge( X, Y ) & path( Y, Z ). }
______________________________________
Line 13 expresses that the import predicate arguments for the module are "node" and "edge", while the export predicate is "path". Line 14 expresses the rule that there is a path between X and X if X is a node. Line 15 expresses the rule that there is a path between X and Z if there is an edge between X and Y, and there is a path between Y and Z. Note that the predicate variable "path" is written with a lower case letter. This is to distinguish it from ordinary variables, such as X. Ordinary variables have the scope of a single rule, predicate variables have the scope of the entire module. Whenever the module is used in another module or rule, the module's import variables must be given real values. The module then provides a definition for its export predicate arguments based on these import definitions. The second-order system model may be combined with the second-order inference structure to produce a query or operation. That is, the second-order system model and the second-order inference structure are used to produce a second-order operation module that specifies an operation to be performed or a query to be answered. An example of a second-order inference structure follows.
______________________________________
(16) module system.sub.-- model( :F, I ) &
(17) module rule.sub.-- set( F, I:Uses ) &
(18) Uses( X, Y ) &
(19) X != Y
______________________________________
Lines 16 and 17 combine the second-order system model and the second-order inference structure. Note in line 16 that the export predicate arguments are defined as "F" and "I" which serve as import variables to the inference structure of line 17. The export predicate of the inference structure is "Uses". Line 18 establishes that predicate variable "Uses" has arguments that are variables "X" and "Y". Line 19 is an example of a built-in predicate that states that "X" cannot equal "Y". Note that the rules within a module have the same meaning as they do in standard first-order logic, except for the scope of predicate names and the meaning of predicate variables. Predicate names are only visible within their defining module, unless they are explicitly exported from one module and imported into another. In the foregoing example, the predicate "file" is exported from "system.sub.-- model" via the variable "F", and is imported into "rule.sub.-- set" via the same variable. Thus, the variable F is bound to the value "file". Predicate names are implicitly extended by the name of their defining module. Hence, predicate "file" is really predicate "system.sub.-- model:file". Whenever a predicate name is used in a subgoal, it is compared with the set of predicate names visible at that point in the program. This operation must be performed at run time. The second-order system model 56, the second-order operation module 58, and the second-order inference structure 60 of this example may now be applied to a transformation engine 62, as shown in FIG. 4. To illustrate the invention, the elements of the foregoing example will be transformed to a first-order textual format that is suitable for use with a PROLOG interpreter. This operation is illustrated in FIG. 9. However, as indicated above, a first-order textual format is not necessary to the invention, nor is any type of conversion to first-order logic necessary. The following data structure may be used to express the second-order logic description of the invention in first-order logic.
______________________________________
(20) tr( Module.sub.-- name, Import.sub.-- args, Export.sub.-- predicates,
Internal.sub.-- predicates, Functor, Args )
______________________________________
The argument "Module.sub.-- name" is the name of the module. If module A is nested inside module B, then the name used is B:A. The names are extended based on the textual nesting of the modules, so it is easily determined and finite. The term "Import.sub.-- args" is a list of import structures. It is the same length as the formal import predicate arguments to the module. This structure is used at run time to hold the actual bindings for the import predicate variables. A specific import structure is described below. "Exports" is a list of formal export predicate variables. It is identical to the list of formal export parameter variables. The term "Internal.sub.13 predicates" is a list of the names of the predicates that are defined within the module, but are not exported. The reference to "Functor" expresses the functor of the original term. If the original functor was variable, then "Functor" will also be variable. The term "Args" identifies a list of the arguments in the original term. The transformation data structure may be applied to the foregoing example of a system model to produce the following code.
______________________________________
(30) tr( system.sub.-- model, [ ], [file,refers.sub.-- to], [ ],
file, [t1] ).
(31) tr( system.sub.-- model, [ ], [file,refers.sub.-- to], [ ],
file, [t2] ).
(32) tr( system.sub.-- model, [ ], [file,refers.sub.-- to], [ ],
file, [t3] ).
(33) tr( system.sub.-- model, [ ], [file,refers.sub.-- to], [ ],
file, [t4] ).
(34) tr( system.sub.-- model, [ ], [file,refers.sub.-- to), [ ],
file, [t5] ).
(35) tr( system.sub.-- model, [ ], [file,refers.sub.-- to], [ ].
refers.sub.-- to, [tl,t2] ).
(36) tr( system.sub.-- model, [ ], [file,refers.sub.-- to], [ ],
refers.sub.-- to, [t1,t3] ).
(37) tr( system.sub.-- model, [ ], [file,refers.sub.-- to] [ ],
refers.sub.-- to [t2,t4] ).
(38) tr( system.sub.-- model, [ ], [file,refers.sub.-- to], [ ],
refers.sub.-- to, [t3,t4] ).
(39) tr( system.sub.-- model, [ ], [file,refers.sub.-- to], [ ],
refers.sub.-- to, [t4,t4] ).
(40) tr( system.sub.-- model, [ ], [file,refers.sub.-- to], [ ],
refers.sub.-- to, [t3,t5] ).
______________________________________
Line 30 corresponds to line 2 above. Note that the first argument of "tr" defines the module name as "system.sub.-- model". The second argument is empty (signified by []) since there are no import predicate arguments to the system.sub.-- model (as shown at line 1 above). The next argument identifies "file" and "refers.sub.-- to" as export predicate arguments. Since there are no internal predicates in the forgoing example, the next field is empty. The next field identifies the functor as "file". The final field identifies the original argument for line 2; that is, the final field identifies the argument "t1". Lines 31-40 similarly convert lines 3 through 12. To transform the second-order inference structure 60 defined above at lines 13-15, an additional data structure is required. Specifically, an import data structure must be defined. A suitable structure is shown in FIG. 9 and at line 41.
______________________________________
(41) import( Module, Import.sub.-- args, Exports, Local,
Functor )
______________________________________
In this structure, "Module" is the name of the module that defined the predicate that is being imported. That module is known as the "defining module". "Import.sub.-- args" are the import predicate variables to the defining module. "Exports" are the export arguments from the defining module. The term "Local" establishes the local predicates of the defined module. Finally, "Functor" is the predicate functor. Using this import structure, lines 13-15 are converted as follows.
______________________________________
(50) tr( rule.sub.-- set,
(51) [import( DNm, DNi, DNe, DN1, Node ),
(52) import( DEm, DEi, DEe, Del, Edge ) ],
(53) [path], [ ], path, [X,X]
(54) ) :-
(55) tr( DNm, DNi, DNe, DN1, Node, [X] ).
(56) tr( rule.sub.-- set,
(57) [import( DNm, DNi, DNe, DN1, Node),
(58) import( DEm, DEi, DEe, DE1, Edge)],
(59) [path], [ ],path,[X,Z],
(60) ) :-
(61) tr( DEm, DEi, DEe, DE1, Edge, [X,Y] ),
(62) tr( rule.sub.-- set[import( DNm, DNi, DNe, DN1, Node ),
(63) import( DEm, DEi, DEe, DE1, Edge ) ],
(64) [path], [ ], path, [Y,Z]).
______________________________________
Line 50 shows the "tr" subgoal and that the module name is "rule.sub.-- set". At line 51, the "Import.sub.-- args" field is substituted with the "import" data structure shown at line 41. Line 51 specifically shows an import data structure for the import argument "Node" of the "rule.sub.-- set" module. These variable names have mnemonic meanings in this example. Thus, DNm is the Dynamic Node Module, because it holds the dynamic value of the module that defines the predicate "node". The general format is DXY: the dynamic value of the Y argument to the module that defines predicate X. Line 52 shows an import data structure for the import argument "Edge". The first term at line 53 indicates that the export predicate is "path". The second term at line 53 is empty because there are no internal predicates in the "rule.sub.-- set" module. The third term at line 53 indicates that "path" is the functor for this rule. The final term at line 53 declares that the arguments for "path" are "X,X" (see line 14). Line 54 describes the "if" term of line 14. Line 55 transforms the "node(x)" term of line 14 into the described first-order data structure. Lines 56 through 64 follow the same format in converting the statements of line 15. The second-order operation module shown at line 16 may be transformed as follows:
______________________________________
(70) tr( rule.sub.-- set,
(71) [import( system.sub.-- model, [ ], [F,I], [ ], F),
(72) import( system.sub.-- model, [ ], [F,I] ,[ ], I)],
(73) [Uses], [ ], Uses, [X,Y]),
(74) X != Y.
______________________________________
The module name is "rule.sub.-- set" because that is the module that defines the predicate represented by the variable "Uses". The import predicate arguments define the calling environment for that instance of "rule.sub.-- set" which in this case is the exported variables from module "system.sub.-- model". The two module calls in the query do not translate to actual "tr" predicates, instead they define the "import.sub.-- args" on subsequent "tr" predicates. Therefore, there is only one "tr" predicate. The term "X!=Y" is a built-in predicate that may be directly used in first-order logic. It should be noted that the foregoing example demonstrates all transformation possibilities. It can be logically proved that there are five transformation cases associated with the second-order logic system of the invention: (1) local and exported predicate calls with a ground functor, (2) imported predicate calls with a ground functor, (3) module calls, (4) calls of a subgoal with a nonground functor, and (5) calls of a built-in predicate. Case (1) is shown at lines 62-64, case (2) is shown at line 55, cases (3) and (4) are shown at lines 70-73. Case (5) is shown at line 74. Thus, an example has been provided of a second-order logic system description 54, including a second-order system model 56, a second-order operation module 58, and a second-order inference structure 60. An example has also demonstrated how a transformation engine can be used to place the second-order logic system description in a first-order logic data structure. The first-order logic data structure is then applied to a query engine 66, which in this case is a standard PROLOG interpreter. Processing at this juncture is a straight-forward first-order logic operation. To show some of the run-time values for the data structure of the invention, the following lines of code are provided.
______________________________________
(75) tr( rule.sub.-- set,
(76) [import( system.sub.-- model, [ ], [file,refers.sub.-- to],
(77) [ ], file ),
(78) import( system.sub.-- model, [ ], [file,refers.sub.-- to],
(79) [ ], refers.sub.-- to ) ],
(80) [path], [ ], path, [X,X]
(81) ) :-
(82) tr( system.sub.-- model, [ ], [file, refers.sub.-- to], [ ],
(83) file, [X] ).
______________________________________
These lines correspond to lines 50-55. Note that the import data variable "DNm" has assumed the value "system.sub.-- model". The import predicate arguments "DNi" are empty because "system.sub.-- model" does not have any import predicate arguments. The exports field "DNe" defines "file,refers.sub.-- to". The local field is empty. The functor "Node" is replaced by the functor "file". Similar transformations are made at lines 78-83. In the present example, the query engine 66 would process the first-order logic description provided above to produce a list of files with interdependencies. However, since "X!=Y", the interdependencies must be to another file (a file cannot depend upon itself). The following output is produced.
______________________________________
(84) X Y
(85) t1 t2
(86) t1 t4
(87) t1 t3
(88) t1 t5
(89) t2 t4
(90) t3 t5
(91) t3 t4
______________________________________
This information regarding file dependencies constitutes system construction commands that are passed to the tool controller 38. The tool controller 38 uses the system construction commands in conjunction with other operations it is performing to produce an updated executable program 46. It should be noted that the system construction commands can be displayed through the user interface 26. Therefore, the apparatus 50 of the invention is used to produce an updated executable program 46, but may also be used to provide a user with software system management information. To more fully illustrate the invention, another example will be provided. This example uses files and logic from an existing system. The second-order system model 56 is defined as follows.
______________________________________
(100)module src( : is, date ) {
(101) is( `cli.c`, c.sub.-- file ).
(102) date( `cli.c`, 732486691 ).
(103) is( `Unix.h`, h.sub.-- file ).
(104) date( `Unix.h`, 732487804 ).
(105) is( `Unix c`, c.sub.-- file ).
(106) date( `Unix.c`, 732326484 ).
(107) is( `aa.y`, yacc.sub.-- file ).
(108) date( `aa.y`, 732320091 ).
(109) is( `aa.h`, h.sub.-- file ).
(110) date( `aa.h`, 732475330 ).
(111) is( `bb.1`, lexfile ).
(112) date( `bb.1`, 731877729 ).
(113) is( `cli.o`, o.sub.-- file ).
(114) date( `cli.o`, 732487744 ) . }
______________________________________
This module defines existing files in a computer system. Note that the module has two export predicate arguments "is" and "date". Each file is declared with an "is" functor. The arguments for each "is" functor include a file name, for instance, "cli.c" at line 101, and the identification of the file type. The "cli.c" file at line 101 is a standard "C" language file. Each file has a corresponding date that is declared in a "date" functor. For example, at line 102 one argument identifies the "cli.c" file and the other argument provides a date for the last work on the file (given in seconds from 1970). Line 103 identifies an "h.sub.-- file" which is a header file that includes "C" file definitions. Line 107 identifies a "yacc.sub.-- file" (Yet Another Compiler Compiler file, YACC.RTM.is a registered trademark of AT&T). Line 111 identifies a "lexfile", which is a lexical analyzer. Line 113 identifies an "o.sub.-- file" which is an object file. The following code represents another module describing a system model. In particular, the following code describes which compilers are to be used and the parameters to be associate with those compilers.
______________________________________
(120)module environment( : env, env.sub.-- control ) {
(121) env( cc, `/bin/acc` ).
(122) env( cflags, `-Xs -g` ).
(123) env( ld.sub.-- flags, `-lce -ldl` ).
(124) env( target.sub.-- name, cli ).
(125) env.sub.-- control( cc, override ).
(126) env.sub.-- control( cflags, override ).
(127) env.sub.-- control( ld.sub.-- flags, union ).
(128) env.sub.-- control( target.sub.-- name, override ) .
______________________________________
}
Note that the module has two export predicate arguments "env" and "env.sub.-- control". Lines 121-124 define "C" compilers and the flags to be used with the compilers. Lines 125-128 describe how the flags should be passed to other build (compilation) environments. A second-order inference structure 60 is demonstrated with the following code.
______________________________________
(150)module stdc( env.sub.-- in, env.sub.-- control, is.sub.-- in,
date.sub.-- in:
(151) is, date, derivation, set ) {
(152) env( Name, Value )<-
(153) env.sub.-- control( Name, Union ) &
(154) (env.sub.-- in( Name, Value ) .linevert split.
env.sub.-- local( Name, Value ) ).
(155) env( Name, Value )<-
(156) env.sub.-- control( Name, local ) &
(157) env.sub.-- local( Name, Value ).
(158) env( Name, Value )<-
(159) env.sub.-- control( Name, override ) &
(160) env.sub.-- in( Name, Value ).
(161) is( Name, Type )<-
(162) is.sub.-- in( Name, Type ).
(163) env.sub.-- local( ld.sub.-- flags, `-ly` )<-
(164) is( .sub.--, yacc.sub.-- file ).
(165) env.sub.-- local( ld.sub.-- flags, `-1l` )<-
(166) is( .sub.--, lex.sub.-- file ).
(167) date( Name, Date )<-
(168) date.sub.-- in( Name, Date ).
(169) date( Name, O ) <-
(170) derived ( Name ) &
(171) !date.sub.-- in( Name , .sub.-- ).
(172) derived( Name )<-
(173) is( Name, o.sub.-- file ).
(174) derived( Name )<-
(175) is( Name, bin.sub.-- file ).
(176) derived( `y.tab.c` )<-
(177) is( `y.tab.c`, c.sub.-- file ).
(178) derived( `lex.yy.c` )<-
(179) is ( `lex.yy.c`, c.sub.-- file ).
(180) is( Bin, bin.sub.-- file )<-
(181) env( target.sub.-- name, Bin ) &
(182) derivation( narrow, ogroup, Bin, .sub.-- ).
(183) derivation( narrow, ogroup, Bin, Command)<-
(184) set( ogroup, O ) &
(185) OO=O // ` ` &
(186) env( target.sub.-- name, Bin ) &
(187) env( ld.sub.-- flags, Flags ) &
(188) FF=Flags // ` ` &
(189) groupby( Bin ) &
(190) Command= `ld -o` // Bin // ` `
// concatenate(FF).
(191) set( ogroup, o )<-
(192) is( O, o.sub.-- file ).
(193) is( O, o.sub.-- file )<-
(194) is( C, c.sub.-- file )&
(195) change.sub.-- extension( C, `.c`, O, `.o,` ) &
(196) derivation( straight, C, O, .sub.--, .sub.-- ).
(197) %compiling c.sub.-- files to o.sub.-- files.
(198) derivation( straight, C, O, Command )<-
(199) is( C, c.sub.-- file )&
(200) change.sub.-- extension( C, `.c`, O, `.o` ) &
(201) env( cc, CC ) &
(202) env( cflags, F )&
(203) FF=` ` // F // ` ` &
(204) groupby( C ) &
(205) Command=
(206) CC // `-o` // O // `-c sun4` //
concatenate (FF) // C.
(207) %yacc rules
(208) derivation( widen, Yacc, yacc.sub.-- group,
Command ) <-
(209) is( Yacc, yacc.sub.-- file )&
(210) Command=`yacc `//Yacc.
(211) is( `y.tab.c`, c.sub.-- file )<-
(212) is( .sub.--, yacc.sub.-- file ).
(213) is( `y.tab.h`, h.sub.-- file )<-
(214) is( .sub.--, yacc.sub.-- file ).
(215) set( yacc.sub.-- group, `y.tab.c` ).
(216) set( yacc.sub.-- group, `y.tab.h` ).
(217) is( `lex.yy.c`, c.sub.-- file )<-
(218) is( .sub.--, lex.sub.-- file ).
(219) derivation( straight, Lex, `lex.yy.c`,
Command )<-
(220) is( Lex, lex.sub.-- file )&
(221) Command=`lex ` // Lex.
(222) change.sub.-- extension( From, F.sub.-- ext, To, T.sub.-- ext )<-
(223) From=Stem // F.sub.-- ext &
(224) To=Stem // T.sub.-- ext. }
______________________________________
Line 150 defines the module as "stdc" (a standard C rule set). The module has four import predicate arguments: "env.sub.-- in" "env.sub.-- control" "is.sub.-- in" and "date.sub.-- in". The first two import predicate arguments are obtained from the module "environment" and the second two import predicate arguments are obtained from the "src" module. Line 151 defines four export predicate arguments: "is", "date" "derivation", and "set". Lines 152 through 160 describe rules to establish the final build environment. For example, lines 152 through 154 establish that the environmental control should be established by the union of the imported values ("env.sub.-- in") and the local values ("env.sub.-- local"). Lines 155-157 establish that the environment should use local values, and lines 158-160 define an override such that local variables are ignored and the passed-in values are used. Lines 161 and 162 explicitly define existing files (a file exists if it is an "is.sub.-- in" predicate). Lines 163 to 166 define flags to be used for "yacc" and "lex" files. Lines 167 and 168 explicitly define date information after it is passed by "date.sub.-- in". Lines 169 through 171 assign a date of zero if a file is derived and has not yet been produced (such as an object file). Lines 172 through 179 define derived predicates. Specifically, lines 172 through 173 define derived object files and lines 174 through 175 define derived binary files. Lines 176 through 177 establish that files from a YACC compiler, which always have the "y.tab.c" name, are defined as derived "C" files. Similarly, lines 178 through 179 establish that files from the lex compiler, which always have the "lex.yy.c" name, are defined as derived "C" files. Lines 180 through 190 define binary (executable) files and how to create them. This code establishes the updated executable program. Lines 180 through 182 show that the binary file is composed of derived object files. Line 183 matches the derivation statement of line 182. Line 184 looks for the "ogroup" file set (all of the object files). Line 185 concatenates the names of the identified object files. Lines 191 through 206 define objects files and how to create them. Lines 193-196 establish that an object file exists if there is a file that is a "c" file (line 193), the file has an extension that can be changed (line 194), and there is a straight derivation from "C" to "O". The straight derivation is defined at lines 198-206. Lines 208 through 216 define "yacc" files and how to compile them. The derivation of a "yacc" file is shown at lines 208 through 210. The derivation is that if there is a "yacc" file (line 209), then to compile it, a "yacc" command is placed in front of the file name (line 210). Lines 211-212 establish that if there is a "yacc.sub.-- file", then there will be a file called "y.tab.c". Similarly, lines 213-214 establish that if there is a "yacc.sub.-- file", then there will be a file called "y.tab.h". Lines 215 and 216 add the "y.tab.c" and the "y.tab.h" files to a "yacc.sub.-- group". Lines 217 through 221 define "lex" files and how to compile them. Lines 217 and 218 establish that there is a "lex.yy.c" file if there is alex file. Lines 219-221 provide the derivation rules (the command "lex" is placed before the lex file name). Lines 222 and 224 define a utility predicate and how to handle naming conventions. The rules utilize string concatenation to take an ending of a file name and place a new name on the file. Note that "//" is the string concatenation operator (i.e., a//b=ab). A second-order operation module 58 may now be defined in relation to the foregoing second-order system model 56 and the second-order inference structure 60. For example, the following code will return the names of all derived files, together with the commands that created them. In other words, the following code will return the names of the commands necessary to rebuild an updated executable program.
______________________________________
(250) module src( :Inputs, Dates ) &
(251) module environment(:Env, Envc ) &
(252) module stdc( Env, Envc, Inputs, Dates:
(253) Created, .sub.--, Derivation, .sub.--) &
(254) Created( New.sub.-- name, .sub.-- ) &
(255) Derivation( .sub.--, .sub.--, New.sub.-- name, Command
______________________________________
).
Line 250 is a call to the "src" module and line 251 is a call to the "environment" module (the second-order system models). Line 252 is a call to module "stdc" (second-order inference structure). The "created" predicate at line 254, which is obtained from the "stdc" module, is used to obtain the names of the created objects (files). The "Derivation" predicate at line 255, which is also obtained from the "stdc" module, is used to identify the command that is necessary to reproduce each created file. The foregoing second-order operation module 58 (lines 250-251), second-order inference structure 60 (lines 150-224), and second-order system model 56 (lines 100-128) are applied to the transformation engine 62 to form a first-order description of the system model, as previously described. The first-order description is applied to the query engine 66 to produce the following set of system construction commands 68.
______________________________________
Name Command
______________________________________
(270)cli.o /bin/acc -o cli.o -c sun4 -Xs -g cli.c
(271)Unix.o /bin/acc -o cli.o -c sun4 -Xs -g Unix.c
(272)y.tab.c
yacc aa.y
(273)y.tab.h
yacc aa.y
(274)y.tab.o
/bin/acc -o cli.o -c sun4 -Xs -g y.tab.c
(275)lex.yy.c
lex bb.l
(276)lex.yy.o
/bin/acc -o cli.o c sun4 -Xs -g lex.yy.c
(277)cli ld -o cli cli.o Unix.o y.tab.o lex.yy.o
lce -ldl -ll -ly
______________________________________
Line 277 is the file name for the new binary (executable) file. Note that the command to produce the file includes a number of object files "clio.o", "Unix.o", "y.tab.o", and "lex.yy.o". The relation of the "cli" binary file to its parent object files is shown in FIG. 10. FIG. 10 illustrates that the object file "Unix.o" is derived from the file "Unix.c". "Unix.c" is an input file, as defined at line 105; its derivation to an object file is established through lines 198-206. FIG. 10 also demonstrates that the object file "y.tab.o" descends from a file called "y.tab.c". The same derivation rules as in the case of "Unix.c" are used. The files "y.tab.c" and "y.tab.h" are derived from the file "aa.y". File "aa.y" is declared at line 107 as a "yacc" file. Lines 211-214 assign each "yacc" file as a "y.tab.c" file and a "y.tab.h" file. The "lex.yy.o" file is derived from "lex.yy.c", which is derived from "bb.1", as shown in FIG. 10. The file "bb.1" is declared at line 111. The lex compilation rules at lines 217-221 yield the "lex.yy.c" file. Lines 191 through 206 are used to create the "lex.yy.o" object file. The information at lines 270-277 (system construction commands) may be displayed through the user interface 26. In addition, the system construction commands are used by the tool controller 38 as it operates with the compilers 40 and linkers 42 to transform the existing program files 44 into an updated executable program 46. Those skilled in the art will recognize a number of advantages associated with the apparatus and method of the invention. First, the present invention provides the ability to automatically identify the interdependencies between files and assign file names for derived files. This capability does not exist in prior art systems, where all file interdependencies and file names must be explicitly declared through a set of rules. With the present invention, a programmer only needs to define the input files and their relations, the steps to build the desired object are automatically executed. The declaration of import predicate arguments and export predicate arguments allows errors to be found at compile time, instead of at execution time. Finally, the invention has provided a mechanism to exploit second-order logic without suffering from the computational penalties associated with second-order logic. The foregoing descriptions of specific embodiments of the present invention are presented for purposes of illustration and description. They are not intended to be exhaustive or to limit the invention to the precise forms disclosed, obviously many modifications and variations are possible in view of the above teachings. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, to thereby enable others skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.
|
Same subclass Same class Consider this |
||||||||||
