Information
-
Patent Application
-
20030065405
-
Publication Number
20030065405
-
Date Filed
October 01, 200123 years ago
-
Date Published
April 03, 200321 years ago
-
Inventors
-
Original Assignees
-
CPC
-
US Classifications
-
International Classifications
- G06F017/00
- G06N007/08
- G06N007/00
- G05B015/00
Abstract
Methods and systems are disclosed for determining whether circular dependency exists in a plurality of dependency rules. The method includes generating for at least some of the plurality of dependency rules a plurality of exclusion lists. Each exclusion list is associated with at least one independent object of a dependency rule and lists as an item a dependent object of the dependency rule. Where an item listed in at least one of the generated exclusion lists corresponds to an independent object having its own exclusion list with at least one item, the at least one item is incorporated into the generated exclusion list. Where at least one of the generated exclusion lists for an independent object includes an item corresponding to the independent object, circular dependency is found. If not, and if all of the dependency rules have been read, circular dependency is not found.
Description
TECHNICAL FIELD
[0001] This invention relates generally to dependencies. More particularly, the present invention relates to methods and systems for determining circular dependency in a plurality of dependency rules.
BACKGROUND OF THE INVENTION
[0002] A concern in the design and verification of systems is dependencies. Dependencies may be static, remaining the same over the life of the system, or they may change over time.
[0003] A dependency is a relationship between two items within which a change to one item, the independent object(s) may affect the meaning of the other item, the dependent object. For example, the dependency rule that object A depends on object B, object C, and object D may be illustrated as follows:
[0004] A→B C D
[0005] A dependent object in one dependency rule may be an independent object in another dependency rule. In addition, it is often not desirable to have circular dependencies in a system. The following three dependency rules, for example, result in a circular dependency:
[0006] A→B
[0007] B→C
[0008] C→A
[0009] In particular, if A, B, and C, in the above example, are vehicles in different locations of a road and the dependency refers to the right of way, circular dependency cannot be allowed in order to avoid an accident.
[0010] One approach for determining the existence of circular dependency is to manually review the dependency rules. This process is typically time consuming and labor intensive. In addition, as the number of dependency rules increases, it is difficult, if not impossible, to manually check for circular dependency.
[0011] Therefore, there is a need for further methods for determining the existence of circular dependency in a plurality of dependency rules.
SUMMARY OF THE INVENTION
[0012] The above need is met by the present invention which in one aspect provides a method for use in determining whether circular dependency exists in a plurality of dependency rules. The method includes generating for at least some of the plurality of dependency rules a plurality of exclusion lists. Each exclusion list is associated with at least one independent object of a dependency rule and lists as an item a dependent object of the dependency rule. Where an item listed in one of the generated exclusion lists corresponds to an independent object having its own exclusion list with at least one item, the at least one item is incorporated into the generated exclusion list. A determination is made whether at least one of the generated exclusion lists for an independent object includes an item corresponding to the independent object. Where at least one of the generated exclusion lists for an independent object includes an item corresponding to the independent object, circular dependency is found, if not and if all the dependency rules have been read, circular dependency is not found.
[0013] Systems and computer program products corresponding to the above-summarized method is also described and claimed herein.
BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The present invention will now be described, by way of example only, with reference to preferred embodiments thereof, as illustrated in the drawings in which:
[0015]
FIG. 1 is a flowchart of one example of a process for determining whether circular object dependency exists in a plurality of dependency rules in accordance with an aspect of the present invention;
[0016]
FIG. 2 is an illustration of the results for determining whether circular object dependency exists in a plurality of dependency rules using the process of FIG. 1 in accordance with an aspect of the present invention; and
[0017]
FIG. 3 depicts one example of an overview computing system which can be used to implement an intellectual property management facility in accordance with an aspect of the present invention.
BEST MODE FOR CARRYING OUT THE INVENTION
[0018] The present invention is directed to methods and systems for systematically determining whether circular dependency exists in a plurality of dependency rules. For example, the method may be implemented to determine whether circular dependency exists in a computer program so that steps may be taken to prevent undesirable consequences.
[0019] As explained in greater detail below, by providing one or more exclusion lists for one or more of the dependent objects in the dependency rules, it is possible to identify whether circular dependency exists in the dependency rules.
[0020]
FIG. 1 illustrates a flowchart of one example of a process 10 for determining whether circular dependency exists in a plurality of dependency rules. Initially, the various steps of FIG. 1 are described, and thereafter the steps are applied to several examples.
[0021] Initially, a first one of a plurality of dependency rules is read or analyzed at 20. At 30, one or more exclusion lists are generated. As described in greater detail below, the generated exclusion lists for each independent object identifies or lists as an item the dependent object. As used herein, the term “generating” is meant to include the creating of separate exclusion lists for each dependency rule and/or extending, expanding, or adding to existing exclusion lists.
[0022] At 40, a determination is made whether the listed item(s), e.g., dependent object(s), have their own exclusion lists. If the listed item(s) have their own exclusion list(s), the listed items in those exclusion lists are incorporated in the generated exclusion list(s) at 50. Thereafter, for each generated exclusion list for an independent object, a determination is made as to whether a listed item corresponds to the independent object at 60. If an item corresponds to an independent object, circular dependency is found at 70.
[0023] If circular dependency is not found, it is next determined whether there are any unread or unanalyzed dependency rules at 80. If there are one or more unread dependency rules, a next dependency rule is read, at 20, and the process is repeated. That is, further exclusion list(s) are generated (e.g., created or extended) at 30, if the listed item(s) have their own exclusion list(s), the listed items in those exclusion lists are incorporated at 50. Again, at 60, a determination is made as to whether for each generated exclusion list for an independent object a listed item corresponds to the independent object. If an item corresponds to the independent object, circular dependency is found at 70.
[0024] If circular dependency is not found, it is determined whether there are any further unread dependency rules at 80. If there are no further unread dependency rules, then at 90, no circular dependency exists for the plurality of dependency rules.
[0025] The above-described illustrated process is further understood in connection with the following examples.
EXAMPLE 1
[0026] In this example, two dependency rules include, first, object A being dependent on object B, and second, object B being dependent on object A. These two dependency rules may be represented as follows:
[0027] A→B
[0028] B→A
[0029] With reference again to FIG. 1, the first step is to read the first dependency rule, A→B, (at 20) and to create a first exclusion list for independent object B by listing as an item dependent object A (at 30) which may be represented as follows:
[0030] B:A
[0031] At this point, there is no exclusion list for item A (at 40), nor is independent object B found in the exclusion list for independent object B (at 60). Since a second dependency rule exists and has not been read (at 80), the second dependency rule, B→A, is read (at 20).
[0032] A second exclusion list for independent object A is generated by listing as an item dependent object B (at 30), as follows:
[0033] A:B
[0034] At this point, there is an exclusion list for item B (i.e., B:A above) and item A in the first exclusion list is incorporated into the second exclusion list (at 50), as follows:
[0035] A:B A
[0036] Item A is found in the exclusion list for independent object A (at 60), and thus, circular dependency is found (at 70).
EXAMPLE 2
[0037] In this example, two dependency rules include, first, object A being dependent on object B, and second, object B being dependent on object C, which may be represented as follows:
[0038] A→B
[0039] B→C
[0040] The first dependency rule, A→B is read (at 20), and a first exclusion list for independent object B is generated listing as an item dependent object A (at 30), as follows:
[0041] B:A
[0042] At this point, there is no exclusion list for item A (at 40), nor is item B found in the exclusion list for independent object B (at 60). Since a second dependency rule exists and has not been read (at 80), second dependency rule, B→C, is read (at 20).
[0043] A second exclusion list for independent object C is generated by listing as an item independent object B (at 30), as follows:
[0044] C:B
[0045] At this point, there is an exclusion list for item B (i.e., B:A above) and item A in the first exclusion list is incorporated into the second exclusion list (at 50), as follows:
[0046] C:B A
[0047] Item C is not found in the exclusion list for independent object C (at 60). All of the dependency rules have been read (at 80), and thus, circular dependency is not found (at 90).
EXAMPLE 3
[0048] In this example, four dependency rules include the following:
[0049] A→B C
[0050] B→C D
[0051] D→E
[0052] E→C A
[0053] A first exclusion list and second exclusion list for independent objects B and C are generated listing as an item dependent object A as follows:
[0054] B:A
[0055] C:A
[0056] There are no exclusion lists for item A, nor is item B found in the exclusion list for independent object B or item C found in the exclusion list for independent object C. Thus the next dependency rule (B→C D) is read resulting in the following exclusion lists:
[0057] C:B
[0058] D:B
[0059] Since item B has it own exclusion list (i.e., B:A, above), item A is incorporated into the exclusion lists for independent objects C and D as follows:
[0060] C:B A
[0061] D:B A
[0062] Since item C is not found in the exclusion list for independent object C and item D is not found in the exclusion list for independent object D, the next dependency rule (D→E) is read resulting in the following exclusion list:
[0063] E:D
[0064] The items for the exclusion list for independent object D (i.e., D:B A) are incorporated into the exclusion list for independent object E as follows:
[0065] E:D B A
[0066] Since item E is not found in the exclusion list for independent object E, the next dependency rule (E→C A) is read resulting in the following exclusion lists:
[0067] C:E
[0068] A:E
[0069] The items for the exclusion list for independent object E (i.e., E:D B A) are incorporated into the exclusion list for object C and A resulting in the following:
[0070] C:E D B A
[0071] A:E D B A
[0072] Since item A is found in the exclusion list for independent object A, circular dependency is found.
EXAMPLE 4
[0073] In this example, three dependency rules include the following:
[0074] Solomon→David (Solomon is a son of David)
[0075] David→Jesse (David is a son of Jesse)
[0076] Jesse→Solomon (Jesse is a son of Solomon)
[0077] A first exclusion list for the first dependency rule is generated as follows (which means that David cannot be a son of Solomon):
[0078] David:Solomon
[0079] A second exclusion list for the second dependency rule is generated as follows (which means that Jesse cannot be a son of David):
[0080] Jesse:David
[0081] At this point, there is an exclusion list for David, and Solomon is incorporated into the second exclusion list as follows (which means that Jesse cannot be a son of David or Solomon):
[0082] Jesse:David Solomon
[0083] The next dependency rule is read and an exclusion list is generated as follows (which means that Solomon cannot be a son of Jesse):
[0084] Solomon:Jesse
[0085] Incorporating the items in the exclusion list for Jesse above into the third exclusion list results in the following:
[0086] Solomon:Jesse David Solomon
[0087] Circular dependency is detected as Solomon is on both sides of the exclusion list. In other words, Solomon cannot be a son of Solomon himself.
EXAMPLE 5
[0088] In this example, two dependency rules include the following
[0089] A→B Program A will preempt program B (stop program B from running)
[0090] B→A Program B will preempt program A (stop program A from running)
[0091] A first exclusion list for the first dependency rule is generated as follows:
[0092] B:A
[0093] A second exclusion list for the second dependency rule is generated as follows:
[0094] A:B
[0095] There is an exclusion list for independent object B and item A in the first exclusion list is incorporated into the second exclusion list resulting in the following:
[0096] A:B A
[0097] Item A is found in the exclusion list for independent object A, and thus, circular dependency is found. In particular, this set of dependency rules can stop both programs A and B from running, and if applied, may prevent a computer from operating properly.
[0098]
FIG. 2 illustrates the results for representing and determining whether circular dependency exists in a plurality of dependency rules using the process of FIG. 1. FIG. 2 is illustrated in connection with Example 3 above. In particular, in this embodiment, a plurality of exclusion lists for the various independent objects are generated and added to (e.g., extended) upon the review of a subsequent one of a plurality of dependency rules.
[0099] For example, from reading the first dependency rule (A→B C), two exclusion lists are generated and listed at (1). Reading the second dependency rule (B→C D), dependent object B is added as an item to the exclusion list for C and an exclusion list for independent object D is generated at (2a). Thereafter, since item B has its own exclusion list (B:A), item A is added to the exclusion list for independent object B at (2b). None of the exclusion lists includes a respective corresponding item.
[0100] Reading the third dependency rule (D→E), an exclusion list for E is generated at (3a), and since item D has its own exclusion list (D:B A), items B and A are added to the exclusion list for independent object E at (3b). None of the exclusion lists includes a respective corresponding item. At (4a), the fourth dependency rule (E→C A) is read. Dependent object E is added as an item to the exclusion list for independent object C and an exclusion list for A is generated at (4a). Since item E has its own exclusion list (E:D B A), items D, B, and A are added to the exclusion lists for A and C at (4b).
[0101] The exclusion lists for independent object A includes item A. Thus, circular dependency is found for this group of four dependency rules.
[0102] From the present description, it will be appreciated to those skilled in the art that other ways of illustrating and/or generating exclusion lists or listing the items according the present invention may be equally suitable, e.g., lists, tables, charts, database entries, etc. Accordingly, the term exclusion lists refers to the association of independent objects to various items or dependent objects and is not to be limited to any specific form.
[0103] From the present description, it will also be appreciated by those skilled in the art that the present invention may be used to detect circular dependency in a plurality of existing dependency rules, as well as detecting circular dependency when setting up or creating dependency rules.
[0104] While the present invention may be implemented manually, the present invention may also be suitably implemented in software, hardware, microcode or any combination thereof to operably review a plurality of dependency rules and determine whether circular dependency is present or review dependency rules as they are created. For a large number of dependency rules, desirably, the processing is automated. Any computing unit, processor, hardware, software, operating system may be suitably employed for carrying out the aspects of the present invention.
[0105] One example of a computing environment incorporating and using an intellectual property management facility in accordance with the present invention is depicted in FIG. 3 and described below.
[0106] Referring to FIG. 3, a computer environment 100 includes, for instance, a computing unit 101 having at least one central processing unit 102, a main storage 104 and one or more input/output devices 106, each of which is described below.
[0107] As is known, central processing unit 102 is the controlling center of computing unit 101 and provides the sequencing and processing facilities for instruction execution, interruption action, timing functions, initial program loading and other machine related functions. The central processing unit executes at least one operating system, which as known, is used to control the operation of the computing unit by controlling the execution of other programs, controlling communication with peripheral devices and controlling use of the computer resources.
[0108] Central processing unit 102 is coupled to main storage 104, which is directly addressable and provides for high speed processing of data by the central processing unit. Main storage may be either physically integrated with the CPU or constructed in stand alone units. The intellectual property database described herein may, in one embodiment, reside within main storage 104.
[0109] Main storage 104 is also coupled to one or more local or remote input/output devices 106. These devices include, for instance, keyboards, communications controllers, teleprocessing devices, printers, magnetic storage media (e.g., tape, disks), direct access storage devices, and sensor based equipment. Data is transferred from main storage 104 to input/output devices 106, and from the input/output devices back to main storage.
[0110] In one example, computer environment 100 can be a single system environment, which includes an RS/6000 computer system running an AIX operating system. (RS/6000 and AIX are offered by International Business Machines Corporation). The invention is not limited to such an environment, however. The capabilities of the present invention can be incorporated and used within many types of computer environments and many types of computer systems. For instance, computer environment 100 can include a UNIX workstation running a UNIX-based operating system. Other variations are also possible and are considered a part of the claimed invention.
[0111] The present invention can be included, for example, in an article of manufacture (e.g., one or more computer program products) having, for instance, computer usable media. This media has embodied therein, for instance, computer readable program code means for providing and facilitating the capabilities of the present invention. The articles of manufacture can be included as part of the computer system or sold separately.
[0112] Additionally, at least one program storage device readable by machine, tangibly embodying at least one program of instructions executable by the machine, to perform the capabilities of the present invention, can be provided.
[0113] The flow diagrams depicted herein are provided by way of example. There may be variations to these diagrams or the steps (or operations) described herein without departing from the spirit of the invention. For instance, in certain cases, the steps may be performed in differing order, or steps may be added, deleted or modified. All of these variations are considered to comprise part of the present invention as recited in the appended claims.
[0114] While the invention has been described in detail herein in accordance with certain preferred embodiments thereof, many modifications and changes therein may be effected by those skilled in the art. Accordingly, it is intended by the appended claims to cover all such modifications and changes as fall within the true spirit and scope of the invention.
Claims
- 1. A method for use in determining whether circular dependency exists in a plurality of dependency rules, the method comprising:
generating for at least some of the plurality of dependency rules a plurality of exclusion lists, each exclusion list being associated with at least one independent object of a dependency rule and listing as an item a dependent object of the dependency rule; where an item listed in one of the generated exclusion lists corresponds to an independent object having its own exclusion list with at least one item, incorporating the at least one item into the generated exclusion list; and determining whether at least one of the generated exclusion lists for an independent object includes an item corresponding to the independent object.
- 2. The method of claim 1 further comprising identifying circular dependency where at least one generated exclusion list for an independent object includes an item corresponding to the independent object.
- 3. The method of claim 1 further comprising determining whether at least one exclusion list has been generated for each of the plurality of dependency rules.
- 4. The method of claim 3 further comprising identifying that circular dependency does not exist where each of the generated exclusion lists do not include an item corresponding to the independent object.
- 5. The method of claim 1 wherein the generating a plurality of exclusion lists comprises:
reading a first one of the plurality of dependency rules; generating an exclusion list for each of the at least one independent object of the first one of the plurality of dependency rules, each exclusion list listing as an item the dependent object in the first one of the plurality of dependency rules; reading a second one of the plurality of dependency rules; and generating an exclusion list for each of the at least one independent object of the second one of the plurality of dependency rules, each exclusion list listing as an item the dependent object in the second one of the plurality of dependency rules.
- 6. The method of claim 5 further comprising subsequently generating an exclusion list for each one of the at least one independent object of a subsequent one of the plurality of dependency rules, each of the at least one subsequent exclusion list listing as an item the dependent object, and repeating the steps of incorporating and determining.
- 7. A system for use in determining whether circular dependency exists in a plurality of dependency rules, the system comprising:
means for generating for at least some of the plurality of dependency rules a plurality of exclusion lists, each exclusion list being associated with at least one independent object of a dependency rule and listing as an item a dependent object of the dependency rule; means for incorporating, where an item listed in one of the generated exclusion lists corresponds to an independent object having its own exclusion list with at least one item, the at least one item into the generated exclusion list; and means for determining whether at least one of the generated exclusion lists for an independent object includes an item corresponding to the independent object.
- 8. The system of claim 7 further comprising means for identifying circular dependency where at lest one generated exclusion list for an independent object includes an item corresponding to the independent object.
- 9. The system of claim 7 further comprising means for determining whether at least one exclusion list has been generated for each of the plurality of dependency rules.
- 10. The system of claim 9 further comprising means for identifying that circular dependency does not exist where each of the generated exclusion lists do not include an item corresponding to the independent object.
- 11. The system of claim 7 wherein the means for generating a plurality of exclusion lists comprises:
means for reading a first one of the plurality of dependency rules; means for generating an exclusion list for each of the at least one independent object of the first one of the plurality of dependency rules, each exclusion list listing as an item the dependent object in the first one of the plurality of dependency rules; means for reading a second one of the plurality of dependency rules; and means for generating an exclusion list for each of the at least one independent object of the second one of the plurality of dependency rules, each exclusion list listing as an item the dependent object in the second one of the plurality of dependency rules.
- 12. The system of claim 11 further comprising means for subsequently generating an exclusion list for each one of the at least one independent object of a subsequent one of the plurality of dependency rules, each of the at least one subsequent exclusion list listing as an item the dependent object, and repeating the steps of incorporating and determining.
- 13. A system for use in determining whether circular dependency exists in a plurality of dependency rules, the system comprising:
a computing unit adapted to generate for at least some of the plurality of dependency rules a plurality of exclusion lists, each exclusion list being associated with at least one independent object of a dependency rule and listing as an item a dependent object of the dependency rule; the computing unit adapted to incorporate, where an item listed in one of the generated exclusion lists corresponds to an independent object having its own exclusion list with at least one item, the at least one item into the generated exclusion list; and the computing unit adapted to determine whether at least one of the generated exclusion lists for an independent object includes an item corresponding to the independent object.
- 14. At least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine to perform a method for use in determining whether circular dependency exists in a plurality of dependency rules, the method comprising:
generating for at least some of the plurality of dependency rules a plurality of exclusion lists, each exclusion list being associated with at least one independent object of a dependency rule and listing as an item a dependent object of the dependency rule; where an item listed in one of the generated exclusion lists corresponds to an independent object having its own exclusion list with at least one item, incorporating the at least one item into the generated exclusion list; and determining whether at least one of the generated exclusion lists for an independent object includes an item corresponding to the independent object.
- 15. The at least one program storage device of claim 14 wherein the method further comprises identifying circular dependency where at least one generated exclusion list for an independent object includes an item corresponding to the independent object.
- 16. The at least one program storage device of claim 14 wherein the method further comprises determining whether at least one exclusion list has been generated for each of the plurality of dependency rules.
- 17. The at least one program storage device of claim 16 wherein the method further comprises identifying that circular dependency does not exist where each of the generated exclusion lists do not include an item corresponding to the independent object.
- 18. The at least one program storage device of claim 14 wherein the generating a plurality of exclusion lists comprises:
reading a first one of the plurality of dependency rules; generating an exclusion list for each of the at least one independent object of the first one of the plurality of dependency rules, each exclusion list listing as an item the dependent object in the first one of the plurality of dependency rules; reading a second one of the plurality of dependency rules; and generating an exclusion list for each of the at least one independent object of the second one of the plurality of dependency rules, each exclusion list listing as an item the dependent object in the second one of the plurality of dependency rules.
- 19. The at least one program storage device of claim 14 wherein the method further comprises subsequently generating an exclusion list for each one of the at least one independent object of a subsequent one of the plurality of dependency rules, each of the at least one subsequent exclusion list listing as an item the dependent object, and repeating steps incorporating and generating.