WO1992018930A1 - Method and apparatus for mapping information from a dynamic frame-based semantic network to a static working memory - Google Patents

Method and apparatus for mapping information from a dynamic frame-based semantic network to a static working memory Download PDF

Info

Publication number
WO1992018930A1
WO1992018930A1 PCT/US1992/002244 US9202244W WO9218930A1 WO 1992018930 A1 WO1992018930 A1 WO 1992018930A1 US 9202244 W US9202244 W US 9202244W WO 9218930 A1 WO9218930 A1 WO 9218930A1
Authority
WO
WIPO (PCT)
Prior art keywords
frames
class
working memory
frame
updated
Prior art date
Application number
PCT/US1992/002244
Other languages
French (fr)
Inventor
Brian G. Milnes
David G. Scarola
Original Assignee
Carnegie Group, Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Carnegie Group, Inc. filed Critical Carnegie Group, Inc.
Publication of WO1992018930A1 publication Critical patent/WO1992018930A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/027Frames
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99941Database schema or data structure
    • Y10S707/99944Object-oriented database structure

Definitions

  • This invention relates to method and apparatus for mapping information from a dynamic frame-based semantic network to a static working memory, for example, in the field of artificial intelligence.
  • Artificial intelligence (Al) technology is a discipline with an ultimate goal of providing a machine that is capable of reasoning, making inferences and following rules in a manner believed to model the human mind. Artificial intelligence provides relatively un- trained users sophisticated computer power to solve practical problems such as to assist in the analysis of massive amounts of relatively unprocessed data to aid in decision-making processes.
  • a knowledge base is a set of knowledge representations which describes a domain of knowledge.
  • a knowledge base is to an artificial intelligence environment what a database is to a conventional comput ⁇ er program. Unlike a database, however, a knowledge base can include executable program material within a defined record herein called a slot.
  • One type or category of representing knowledge is descriptive knowledge. This category is the collection and classi ⁇ fication of facts and categorizations about an idea or entity which might be acted upon.
  • the basic units of descriptive knowledge are generally called frames.
  • a frame contains one or more slots.
  • slots embody the attribute, rela- tionship, and procedural information of the object or concept which is being represented.
  • a collection of slots is a frame which is an atomic unit of knowledge.
  • Two types of frames are provided herein: class and instance.
  • a class frame is used to represent a general- ized type or category of object.
  • An instance is used to represent a particular member of a class.
  • Attrib ⁇ ute is used to store values (e.g. integer numbers, character strings, etc.).
  • Relation slots are used to store user-defined links between frames in the knowledge base.
  • Message slots are used to store procedural code (i.e. functions) which is executed in response to messages sent to the frame by an application program.
  • An object of the present invention is to provide an efficient and accurate method and apparatus for mapping information from a dynamic frame-based semantic network to a static working memory utilizing a topological sorting algorithm.
  • a method for mapping information from a dynamic frame-based semantic network to a static working memory having a plurality of working memory elements.
  • the method includes the steps of creating one class queue and one instance queue of frames to obtain queued frames having the information to be mapped, marking each of the queued frames of the class queue to order the queued frames of the class queue and updating working memory elements of the working memory corresponding to the queued frames with the information to be mapped based on the order of the queued frames of the class queue to obtain an updated working memory.
  • an apparatus for mapping information from a dynamic frame-based semantic network to the static working memory includes means for creating one class queue and one instance queue of frames to obtain queued frames having the information to be mapped and means for marking each of the queued frames of the class queue to order the queued frames of the class queue.
  • the apparatus also includes means for updating the working memory elements of the working memory corresponding to the queued frames with information to be mapped based on the order of the queued frames of the class queue to obtain an updated working memory.
  • At least one of the class frames has multiple queued parent class frames having a first part of the information and at least one instance frame.
  • the multiple queued parent class frames are marked during the marking.
  • Working memory elements corresponding to the class frames and instance frames are updated with the first part of the information during the updating.
  • FIGURE 1 is a schematic block diagram view of frames which have values and which are organized into a frame hierarchy
  • FIGURE 2 is a schematic block diagram view of the frame hierarchy of Figure 1 but whose values are modi ⁇ fied;
  • FIGURE 3 is a block diagram flow chart illustrating a first part of topological sorting algorithm of the method and apparatus of the present invention
  • FIGURE 4 is a block diagram flow chart illustrating the second part of the algorithm.
  • the method and apparatus of the present invention merges the frame-based technology of a frame system such as ROCK with the rule-based technology provided by a rule language such as TIN.
  • the frame-based system always supports dynamic runtime inheritance of slots and values across system-relations subclassOf and instanceOf from classes to descendant classes and instances.
  • the rule language does not support inheritance of slots and values at runtime.
  • SubclassOf links a class to its parent classes (of which there are one or more) .
  • InstanceOf links an instance to its (single) parent class.
  • values may be inherited across either of these links at runtime.
  • every frame which matches against rules is given a working memory element (wme) internally.
  • rule languages are designed to match rules against wmes -- data structures which are much simpler and more static than frames.
  • the wmes are created in the present invention so that they contain the slots and values from the frame that are matched in the rules. "Matching rules against a frame" is implemented by matching rules against the wme for the frame.
  • a problem arises: since runtime inheritance of slots and values is not supported in rule language wmes, a mechanism must be implemented which updates the wmes so that they accurately reflect the same data that is in the corresponding frames.
  • the way in which inheritance of slots and values across subclassOf and instanceOf is propagated to wmes (thereby storing the proper updated data in the wmes) is dis- closed herein.
  • Example a set of class and instance frames with slots and values.
  • a relatively small frame system application has the following frames and slots:
  • Class Frames Classl Class2 Class3 Class4 Instance Frames: Instancel Instance2 Instance3
  • the frames are organized into a frame hierarchy of Figure 1 (the slots and values that each frame contains are in curly brackets).
  • Class3 and Class4 are subclasses of both Classl and Class2.
  • Instancel and Instance2 are instances of Class3.
  • - Instance3 and Instance4 are instances of Class4.
  • inheritance occurs at runtime.
  • the frame system function kb_GetValue is called to access the value for a slot in a frame
  • the local value is returned.
  • the frame system function kb_GetValue is called to access the value of Slotl contained in Instancel
  • -1 is returned.
  • inheritance is used to access the value for that slot from an ancestor of that frame.
  • Rule condi ⁇ tions can be created which contain tests against frame classes and slot values.
  • the following rule contains a single rule condition:
  • the rule contains tests for Classl, Slotl, and Slot2.
  • Class frame Classl and all descendant class and instance frames of Classl are matched against this condition.
  • the semantics of the invention are specified such that only the frames that pass the following tests successfully match the condition:
  • the frame is either Classl, a descendant class of Classl, or an instance of Classl.
  • the value for Slotl in a frame is less-rthan 0 (i.e., Slotl ⁇ 0)
  • the value for Slot2 in a frame is greater-than 0 (i.e., Slot > 0)
  • the value for a slot in a frame which is used in rule tests can either be local or inheritable. Inheri ⁇ tance values are inherited across the system-defined relations (subclassOf and instanceOf).
  • Each frame which matches rules has an associated rule language working-memory element (wme) .
  • wme working-memory element
  • Both class and instance frames match rules. Therefore, both class and instance frames have associated wmes.
  • the wme for a frame is a vector which contains slots and values.
  • the slots in a wme associated with a particular frame are all the slots which are both local to the frame or inheritable across either subclassOf or instanceOf to that frame.
  • Instancel contains Slotl locally, and Slot2 and Slot3 by inheritance (Slot2 is inherited from Class2 and Slot3 is inherited from Class3).
  • the wme for Instancel contains slots Slotl, Slot2 and Slot3.
  • the wme values are the local or inheritable values for each slot in the frame.
  • Instancel contains -1 for Slotl locally, and Instancel inherits 10 for Slot2 from Class2 and 100 for Slot3 from Class3. Therefore, the wme for Instancel, contains values -1 for Slotl, 10 for Slot2, and 100 for Slot3. That is, the wme for Instancel is:
  • Matching a frame against a rule is implemented by matching the wme associated with the frame against a rule. Since a wme is a mirror copy of a frame, and the wme contains the same local and inheritable slots and values as the frame, matching the wme against a rule gives the same result as matching the frame against a rule. WMEs are matched against rules instead of match ⁇ ing frames directly because wme vectors can be matched much faster than frames.
  • matching Instancel against rule Rl is implemented by matching wmel against rule Rl:
  • wmel contains -1 for Slotl, which is less than 0 3) wmel contains 10 for Slot2, which is greater than 0
  • WME1 passes the tests in the condition for Rl and so it matches Rl. Therefore, Instancel matches Rl.
  • rule language wmes do not support runtime inheritance. That is, values can only be set and accessed locally in a wme. Values in a wme are never inherited during runtime to other wmes. However, values can be inherited during runtime among frames. Since a wme mirrors a frame, and the wme contains both local and inheritable values for a frame, the inheritable values must somehow be propagated down to the wme (that is, the wme is essentially a cache of the frame values) . The way in which values that are inheritable to a frame across relations instanceOf and subclassOf are propagated to the wme for rule matching is described hereinbelow. Overview Of Propagating Inheritable Frames Values To WMEs
  • a frame When a frame is modified herein, the frame is placed on a queue. Queue processing involves ordering the frames on the queue. After the queue is ordered, the frames on the queue are traversed in that order, and values are updated in each frame's associated wme. In the example given above, Instancel contains value -1 in Slotl. If a frame system function is invoked which modifies the value of Slotl in Instancel, then Instancel is placed on the queue. When the queue is processed, the value for Slotl in the wme that mirrors Instancel is set to the new value.
  • the queue is processed using an implementation of a topological sorting algorithm with filtering.
  • the topological sorting algorithm applies an ordering to classes on the queue. This ordering is followed when the wmes corresponding to the class frames are updated. An ordering is required because a particular frame may inherit values from multiple updated classes; if there is no ordering, inefficiency (and possibly even incor- rectness) will result because the frame's wme will be updated multiple times, once for each inheritable modification.
  • Class frames only are ordered because an ordering only needs to be applied to the frames from which values are inheritable across system-defined relations.
  • An instance frame is updated in the same order as its class. Since values are not inheritable across system- relations from instances, the instances do not need to be ordered. Therefore, two frame queues are maintained, namely a class queue and an instance queue.
  • the in ⁇ stance queue is maintained to have a place to store local changes which are made to the instances.
  • Filtering is used to block the propagation of frame value changes which do not need to be propagated to wmes. If the value for a slot is updated in a class, the wme for any descendant frame of the class that has a local value for the slot does not need to be updated with the value (the local value overrides the innerit- able value) . Therefore, filtering is applied to block the propagation of the updated value.
  • the frame queues which contain updated frames and slots whose values were updated, are as follows after these value updates:
  • a marking pass which orders the classes
  • An update pass which updates the wmes for the ordered frames.
  • the marking pass traverses the frames on the class queue to apply an order to the classes.
  • a counter is kept for each class.
  • the counter is used to maintain the order in which the wmes for the classes on the queue (and their subclasses and instances) are updated. WMEs are updated during the update pass (described below) .
  • the order required for wme updates ensures that a frame is updated after every class which contains an updated value that is inherit ⁇ able to that frame has been updated. Therefore, the counter for a class represents the number of such classes that must be updated before the class itself is updated.
  • the marking pass iterates down the classes on the class queue, and for each class executes the following steps:
  • step 2 the subclassOf link of a class is accessed to gather the subclasses of the class. In ⁇ stances are not accessed during the marking pass because an instance is updated in the same order as its class.
  • Class2.count 1- Access subclass Class3:
  • Class3.count 1 since Class3 has no subclasses, return. Access subclass Class4:
  • Class4.count 1 since Class4 has no subclasses, return. Access Class4 from the queue:
  • the update pass tra ⁇ verses the classes that were ordered during the marking phase and propagates all value updates to the wmes in the specified order.
  • the order is based on the counters associated with each class.
  • the counter indicates that a class' wme (and the wmes for the class' instances) should only be updated after the counter reaches 0.
  • a frame's counter reaches zero, it means that wmes for all frames on which that frame depends for slot and value inheritance have been updated; the wme for the frame is then updated.
  • the updated wme reflects all modified local values of a frame and all modified values which were inherited across subclassOf and instanceOf to that frame.
  • the basic update pass "pops" a class off of the class queue and executes the follow- ing steps on that class:
  • step 2b immediately above, the instances are gathered by accessing the instanceOf link in the class.
  • step 2c the subclasses are gathered by accessing the subclassOf link in the class.
  • Class2_wme.Slot2 -10] b. Class2 has no instances c. Access subclass Class3:
  • the wmes reflect the local and inheritable slots and values from the frame-base.
  • the wmes are then matched against the rules, effectively matching both local and inheritable f ame values.
  • wme updates which reflect multiple frame updates are supported by building a list or data structure of slots and values to update during the update pass. This list is built incrementally as the subclasses of enqueued classes are traversed during the update pass (whenever a class from which a value is inherited is traversed during the update pass, the slot & value are added to the inherit ⁇ able-slot-value-list).
  • UPDATE_WME the frame whose wme must be updated and the inher ⁇ itable-slot-value-list are passed in.
  • the inherit ⁇ able-slot-value-list is merged with the local value updates to that frame.
  • the wme is updated by setting the local and inheritable values in the wme.
  • Filters are applied to frames to avoid unnec ⁇ essary updates.
  • a filter recognizes that an inheritable slot should not be updated in the wme for a frame which has a local value for the slot. The local value is used instead of the inheritable value.
  • one of the members of the inheritable-slot-and-value-list is [Slotl, -1] which is the inheritable value for Slotl from the update to Classl. This must be filtered for Instancel because Instancel has a local value for Slotl.
  • topological sorting allows the runtime inheri ⁇ tance of slots and values across subclassOf and in- stanceOf, which is not part of working memory in a rule language, to be active when matching rules against frames.
  • This application of topological sorting pro ⁇ vides a correctness and performance improvement over the ad hoc approach to inheritance for matching implemented in the prior art.
  • the algorithm is correct because all frames on which a frame depends for inheritance are updated before that frame is updated. Therefore, when a frame is updated, it will get the correct inherited values.
  • the algorithm is efficient because each frame is updated only one time.
  • the correctness and efficiency of topological sorting is described in the technical report "Reducing Computation by Unifying Inference with User Interface” by Mark Perlin.
  • topological sorting is also unique because it utilizes the complexity of inheritance of a frame system, allows for inheritance of multiple slots and values, inheritance from multiple classes, and filter optimizations.

Abstract

Method and apparatus are provided for mapping information from a dynamic frame-based semantic network to a static working memory by utilizing a topological sorting algorithm which processes at least one queue of frames. Preferably, the algorithm is utilised with filtering to avoid unnecessary updates. The algorithm makes a marking pass and an updating pass across the queued frames. The marking pass orders a queue of class frames. The updating pass updates working memory elements of the working memory corresponding to the ordered class frames and working memory elements which correspond to instances of the class. After the updating pass, the working memory elements reflect local and inheritable slots and values from the semantic network. Such mapping allows the working memory elements to be further processed such as by matching against rules.

Description

METHOD AND APPARATUS FOR
MAPPING INFORMATION FROM A DYNAMIC FRAME-BASED
SEMANTIC NETWORK TO A STATIC WORKING MEMORY
TECHNICAL FIELD
This invention relates to method and apparatus for mapping information from a dynamic frame-based semantic network to a static working memory, for example, in the field of artificial intelligence.
BACKGROUND ART
Artificial intelligence (Al) technology is a discipline with an ultimate goal of providing a machine that is capable of reasoning, making inferences and following rules in a manner believed to model the human mind. Artificial intelligence provides relatively un- trained users sophisticated computer power to solve practical problems such as to assist in the analysis of massive amounts of relatively unprocessed data to aid in decision-making processes.
In the field of artificial intelligence, "knowl- edge" is a combination of data structures and interpre¬ tive procedures which, if suitably manipulated, will lead to what might best be termed "knowledgeable" behavior. A knowledge base is a set of knowledge representations which describes a domain of knowledge. A knowledge base is to an artificial intelligence environment what a database is to a conventional comput¬ er program. Unlike a database, however, a knowledge base can include executable program material within a defined record herein called a slot. One type or category of representing knowledge is descriptive knowledge. This category is the collection and classi¬ fication of facts and categorizations about an idea or entity which might be acted upon. The basic units of descriptive knowledge are generally called frames. A frame contains one or more slots.
As used herein, slots embody the attribute, rela- tionship, and procedural information of the object or concept which is being represented. A collection of slots is a frame which is an atomic unit of knowledge. Two types of frames are provided herein: class and instance. A class frame is used to represent a general- ized type or category of object. An instance is used to represent a particular member of a class.
Three types of slots are provided herein: attrib¬ ute, relation, and message. Attribute slots are used to store values (e.g. integer numbers, character strings, etc.). Relation slots are used to store user-defined links between frames in the knowledge base. Message slots are used to store procedural code (i.e. functions) which is executed in response to messages sent to the frame by an application program.
One of the key concepts of artificial intelligence is that of inheritance. It is a development of the idea of using a hierarchical structure for relating frames in a knowledge base. The key to these structures is the concept of connecting relations between structures of data or knowledge through which information about slots may pass to other structures of data or knowledge.
There is a need for an efficient and accurate way to merge a frame-based system such as ROCK with a rule- based system such as TIN so that inheritance of slots and values can occur at runtime rather than at compile time. Knowledge Craft provides an ad hoc approach to inheritance for rule matching which is not particularly efficient or accurate.
SUMMARY OF THE INVENTION
An object of the present invention is to provide an efficient and accurate method and apparatus for mapping information from a dynamic frame-based semantic network to a static working memory utilizing a topological sorting algorithm.
In carrying out the above object and other objects of the present invention, a method is provided for mapping information from a dynamic frame-based semantic network to a static working memory having a plurality of working memory elements. The method includes the steps of creating one class queue and one instance queue of frames to obtain queued frames having the information to be mapped, marking each of the queued frames of the class queue to order the queued frames of the class queue and updating working memory elements of the working memory corresponding to the queued frames with the information to be mapped based on the order of the queued frames of the class queue to obtain an updated working memory.
Further in carrying out the above object and other objects of the present invention in a data processing system including processing means and memory means including a static working memory having a plurality of working memory elements operatively coupled to the processing means, an apparatus for mapping information from a dynamic frame-based semantic network to the static working memory is provided. The apparatus includes means for creating one class queue and one instance queue of frames to obtain queued frames having the information to be mapped and means for marking each of the queued frames of the class queue to order the queued frames of the class queue. The apparatus also includes means for updating the working memory elements of the working memory corresponding to the queued frames with information to be mapped based on the order of the queued frames of the class queue to obtain an updated working memory.
Preferably, at least one of the class frames has multiple queued parent class frames having a first part of the information and at least one instance frame. The multiple queued parent class frames are marked during the marking. Working memory elements corresponding to the class frames and instance frames are updated with the first part of the information during the updating.
The above objects and other objects, features, and advantages of the present invention are readily apparent from the following detailed description of the best mode for carrying out the invention when taken in connection with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
FIGURE 1 is a schematic block diagram view of frames which have values and which are organized into a frame hierarchy;
FIGURE 2 is a schematic block diagram view of the frame hierarchy of Figure 1 but whose values are modi¬ fied;
FIGURE 3 is a block diagram flow chart illustrating a first part of topological sorting algorithm of the method and apparatus of the present invention; and FIGURE 4 is a block diagram flow chart illustrating the second part of the algorithm.
BEST MODE FOR CARRYING OUT THE INVENTION
Introduction
The method and apparatus of the present invention merges the frame-based technology of a frame system such as ROCK with the rule-based technology provided by a rule language such as TIN. The frame-based system always supports dynamic runtime inheritance of slots and values across system-relations subclassOf and instanceOf from classes to descendant classes and instances. The rule language does not support inheritance of slots and values at runtime.
SubclassOf links a class to its parent classes (of which there are one or more) . InstanceOf links an instance to its (single) parent class. In the frame system, values may be inherited across either of these links at runtime.
In the method and apparatus of the present inven- tion, every frame which matches against rules is given a working memory element (wme) internally. In general, rule languages are designed to match rules against wmes -- data structures which are much simpler and more static than frames. The wmes are created in the present invention so that they contain the slots and values from the frame that are matched in the rules. "Matching rules against a frame" is implemented by matching rules against the wme for the frame. As a program executes and rules are fired and values in frames change, a problem arises: since runtime inheritance of slots and values is not supported in rule language wmes, a mechanism must be implemented which updates the wmes so that they accurately reflect the same data that is in the corresponding frames. The way in which inheritance of slots and values across subclassOf and instanceOf is propagated to wmes (thereby storing the proper updated data in the wmes) is dis- closed herein.
Another way of stating the problem is that much of the data in frames does not exist locally; rather it is inherited from other frames at runtime. Wmes are very different since all of a wme's information exists locally in the wme, and no information is inherited at runtime. When a value is changed in a frame, the wme corresponding to the frame must be updated as well as all the wmes which correspond to frames which can inherit the value.
Example: a set of class and instance frames with slots and values.
A relatively small frame system application has the following frames and slots:
Class Frames: Classl Class2 Class3 Class4 Instance Frames: Instancel Instance2 Instance3
Instance4 Attribute Slots: Slotl Slot2 Slot3
In this application, the frames are organized into a frame hierarchy of Figure 1 (the slots and values that each frame contains are in curly brackets). Class3 and Class4 are subclasses of both Classl and Class2.
Instancel and Instance2 are instances of Class3. - Instance3 and Instance4 are instances of Class4.
Inheritance of Slots
Instancel and Instance2 inherit the following slots:
- Slotl from Classl
Slot2 from Class2 Slot3 from Class3
Instance3 and Instance4 inherit the following slots:
- Slotl from Classl and Class4
Slot2 from Class2
Runtime Inheritance
In the frame system, inheritance occurs at runtime. When the frame system function kb_GetValue is called to access the value for a slot in a frame, if the frame contains the local value for a slot, the local value is returned. For example, when the frame system function kb_GetValue is called to access the value of Slotl contained in Instancel, -1 is returned. However, when a frame does not contain a local value for a slot, inheritance is used to access the value for that slot from an ancestor of that frame. If kb_GetValue is used to access the value of Slot3 in Instancel, since In¬ stancel does not contain a local value for Slot3, the value 100 is inherited from Class3 across system-rela¬ tion instanceOf and returned from kb_GetValue.
Rule Example
The method and apparatus of the present invention allows rules to be matched against frames. Rule condi¬ tions can be created which contain tests against frame classes and slot values. For example, the following rule contains a single rule condition:
Figure imgf000010_0001
{
The rule contains tests for Classl, Slotl, and Slot2. Class frame Classl and all descendant class and instance frames of Classl are matched against this condition. The semantics of the invention are specified such that only the frames that pass the following tests successfully match the condition:
The frame is either Classl, a descendant class of Classl, or an instance of Classl.
AND
The value for Slotl in a frame is less-rthan 0 (i.e., Slotl < 0)
AND
The value for Slot2 in a frame is greater-than 0 (i.e., Slot > 0) The value for a slot in a frame which is used in rule tests can either be local or inheritable. Inheri¬ tance values are inherited across the system-defined relations (subclassOf and instanceOf).
Working-Memory Elements (wmes)
Each frame which matches rules has an associated rule language working-memory element (wme) . Both class and instance frames match rules. Therefore, both class and instance frames have associated wmes. The wme for a frame is a vector which contains slots and values. The slots in a wme associated with a particular frame are all the slots which are both local to the frame or inheritable across either subclassOf or instanceOf to that frame.
For example, Instancel contains Slotl locally, and Slot2 and Slot3 by inheritance (Slot2 is inherited from Class2 and Slot3 is inherited from Class3). The wme for Instancel contains slots Slotl, Slot2 and Slot3.
The wme values are the local or inheritable values for each slot in the frame. For example, Instancel contains -1 for Slotl locally, and Instancel inherits 10 for Slot2 from Class2 and 100 for Slot3 from Class3. Therefore, the wme for Instancel, contains values -1 for Slotl, 10 for Slot2, and 100 for Slot3. That is, the wme for Instancel is:
wmel
{ Slotl: -1 Slot2: 10 Slot3: 100 } Matching Frames Against Rules
Matching a frame against a rule is implemented by matching the wme associated with the frame against a rule. Since a wme is a mirror copy of a frame, and the wme contains the same local and inheritable slots and values as the frame, matching the wme against a rule gives the same result as matching the frame against a rule. WMEs are matched against rules instead of match¬ ing frames directly because wme vectors can be matched much faster than frames.
For example, matching Instancel against rule Rl is implemented by matching wmel against rule Rl:
1) wmel corresponds to an instance frame of Classl
2) wmel contains -1 for Slotl, which is less than 0 3) wmel contains 10 for Slot2, which is greater than 0
WME1 passes the tests in the condition for Rl and so it matches Rl. Therefore, Instancel matches Rl.
Matching System-Inherited Values
As previously mentioned, rule language wmes do not support runtime inheritance. That is, values can only be set and accessed locally in a wme. Values in a wme are never inherited during runtime to other wmes. However, values can be inherited during runtime among frames. Since a wme mirrors a frame, and the wme contains both local and inheritable values for a frame, the inheritable values must somehow be propagated down to the wme (that is, the wme is essentially a cache of the frame values) . The way in which values that are inheritable to a frame across relations instanceOf and subclassOf are propagated to the wme for rule matching is described hereinbelow. Overview Of Propagating Inheritable Frames Values To WMEs
When a frame is modified herein, the frame is placed on a queue. Queue processing involves ordering the frames on the queue. After the queue is ordered, the frames on the queue are traversed in that order, and values are updated in each frame's associated wme. In the example given above, Instancel contains value -1 in Slotl. If a frame system function is invoked which modifies the value of Slotl in Instancel, then Instancel is placed on the queue. When the queue is processed, the value for Slotl in the wme that mirrors Instancel is set to the new value.
Maintaining the correspondence between frame values and wme values is more difficult when inheritable values are modified. When a class that contains a slot which is inheritable to descendant classes and instances is updated to contain a new value for the slot, the class is placed on the queue. When the queue is processed, the wme for the class and the wmes for any descendant classes and instances that can inherit the updated value for the slot are updated. For example, if the value of
Slot3 in Class3 is updated, Class3 is placed on the queue. When the queue is processed, the wmes for Class3, Instancel, and Instance2 must all be updated to contain the new value for Slot3.
The queue is processed using an implementation of a topological sorting algorithm with filtering. The topological sorting algorithm applies an ordering to classes on the queue. This ordering is followed when the wmes corresponding to the class frames are updated. An ordering is required because a particular frame may inherit values from multiple updated classes; if there is no ordering, inefficiency (and possibly even incor- rectness) will result because the frame's wme will be updated multiple times, once for each inheritable modification.
Class frames only are ordered because an ordering only needs to be applied to the frames from which values are inheritable across system-defined relations. An instance frame is updated in the same order as its class. Since values are not inheritable across system- relations from instances, the instances do not need to be ordered. Therefore, two frame queues are maintained, namely a class queue and an instance queue. The in¬ stance queue is maintained to have a place to store local changes which are made to the instances.
Filtering is used to block the propagation of frame value changes which do not need to be propagated to wmes. If the value for a slot is updated in a class, the wme for any descendant frame of the class that has a local value for the slot does not need to be updated with the value (the local value overrides the innerit- able value) . Therefore, filtering is applied to block the propagation of the updated value.
Implementation Of Propagating Inheritable Frame Values to WMEs
An example involving updates to the frames of the hierarchy of Figure 1 is described hereinbelow. The following calls to kb_SetValue are made (the frame system function kb_SetValue is used to update a slot value in a frame) :
Figure imgf000014_0001
The frame queues, which contain updated frames and slots whose values were updated, are as follows after these value updates:
Class queue: [Class2, Slot2] [Class4, Slotl]
[Classl, Slotl]
Instance queue: [Instancel, Slotl]
[Instance4, Slot2, Slotl]
The resulting frame hierarchy is illustrated in Figure 2.
Even though the values in these frames of Figure 2 have been updated, these frames are still on the frame queue. The updated values are reflected in the frames but not in the wmes. The wmes are updated to reflect these frame changes when the queue is processed. The queue is processed and wmes are updated just before rules are matched. Queue processing involves making two passes across frames on the queue:
(1) A marking pass which orders the classes; and (2) An update pass which updates the wmes for the ordered frames.
1. The Marking Pass
As illustrated in Figure 3, the marking pass traverses the frames on the class queue to apply an order to the classes. A counter is kept for each class. The counter is used to maintain the order in which the wmes for the classes on the queue (and their subclasses and instances) are updated. WMEs are updated during the update pass (described below) . The order required for wme updates ensures that a frame is updated after every class which contains an updated value that is inherit¬ able to that frame has been updated. Therefore, the counter for a class represents the number of such classes that must be updated before the class itself is updated.
As shown in Figure 3, the marking pass iterates down the classes on the class queue, and for each class executes the following steps:
1. Increment the counter for that class; and
2. If the counter equals 1: for each subclass of that class, repeat step 1.
In step 2, the subclassOf link of a class is accessed to gather the subclasses of the class. In¬ stances are not accessed during the marking pass because an instance is updated in the same order as its class.
Executing the marking pass on the example class queue would create the following counter changes:
— Access Class2 from the queue:
1. Increment counter [result: Class2.count
= 1]
2. Class2.count = 1- Access subclass Class3:
1. Increment counter [result: Class3.count = 1]
2. Class3.count = 1 since Class3 has no subclasses, return. Access subclass Class4:
1. Increment counter [result: Class4.count = 1]
2. Class4.count = 1 since Class4 has no subclasses, return. Access Class4 from the queue:
1. Increment counter [result: Class4.count = 2]
2. Class4.count = 2 so return.
Access Classl from the queue: 1. Increment counter [result: Classl.count = 1] 2. Classl.count = 1
Access subclass Class3:
1. Increment counter [result: Class3.count = 2] 2. Class3.count = 2 so return.
Access subclass Class4:
1. Increment counter [result: Class4.count
=3]
2. Class4.count = 3 so return.
Final result:
Classl.count = 1 Class2.count = 1 Class3.count = 2 Class4.count = 3
The Update Pass
As illustrated in Figure 4, the update pass tra¬ verses the classes that were ordered during the marking phase and propagates all value updates to the wmes in the specified order. The order is based on the counters associated with each class. The counter indicates that a class' wme (and the wmes for the class' instances) should only be updated after the counter reaches 0. When a frame's counter reaches zero, it means that wmes for all frames on which that frame depends for slot and value inheritance have been updated; the wme for the frame is then updated. The updated wme reflects all modified local values of a frame and all modified values which were inherited across subclassOf and instanceOf to that frame.
As shown in Figure 4, the basic update pass "pops" a class off of the class queue and executes the follow- ing steps on that class:
1. Decrement the counter for that class.
2. If the counter = 0: a. call UPDATE_WME for that class; b. call UPDATE_WME for each instance of that class; c. for each subclass of that class, go to step 1. In step 2b immediately above, the instances are gathered by accessing the instanceOf link in the class. In step 2c, the subclasses are gathered by accessing the subclassOf link in the class.
Executing the update pass on the example queue above creates the following updates:
Access Class2 from the queue:
1. decrement counter [result; Class2.count = 0]
2. Class2.count - 0: a. UPDATE_WME (Class2)
[result: Class2_wme.Slot2 = -10] b. Class2 has no instances c. Access subclass Class3:
1. decrement counter [result: Class3.count = 1]
2. Class3.count = 1 so return.
Access subclass Class4:
1. decrement counter [result: Class4.count = 2]
2. Class4.count = 2 so return.
Access Class4 from the queue:
1. decrement counter [result: Class4.count = 1]
2. Class4.count = 1 so return.
Access Classl from the queue:
1. decrement counter [result: Classl.count = 0]
2. Classl.count = 0: a. UPDATE_WME (Classl) [result: Classl_wme.Slotl = -1] b. Classl has no instances c. Access subclass Class3:
1. decrement counter [result: Class3.count = 0]
2. Class3.count = 0: a. UPDATE_WME( Class3 )
[result: Class3_wme.Slotl = -1] Class3_wme.Slot2 = -10] b. UPDATE_WME (Instancel)
[result:Instancel_wme.Slot1= -5
Instancel_wme.Slot2=-10] UPDATE_WME (Instance2) [result:Instance2_wme.Slotl=-l Instance2_wme.Slot2=-10] c. Class3 has no subclasses
Access subclass Class4 1. decrement counter
[result: Class4.count =0] 2. Class4.count = 0: a. UPDATE_WME (Class4)
[result: Class4_wme.Slotl= -1000 Class4_wme.Slot2= -10] b. UPDATE_WME (Instance3) [result: Instance3_wme.Slotl =
-1000 Instance3_wme.Slot2 = . -10]
UPDATE_WME (Instance4) [result: Instance4_wme.Slotl =
-7 Instance4_wme.Slot2 =
-7] c. Class4 has no subclasses
After the update pass is completed, the wmes reflect the local and inheritable slots and values from the frame-base. The wmes are then matched against the rules, effectively matching both local and inheritable f ame values.
While the basic algorithm is given above, a few preferred features that are described in the example are highlighted as follows:
(1) Some of the UPDATE_WME calls update multiple values in a wme. For example, the UPDATE WME call for Instancel updated Slotl in the wme to contain value -5, which was set locally in Instancel, and updated Slot2 to contain value -10, which is the value inherited to Instancel for Slot2 from Class2.
Multiple wme updates which reflect multiple frame updates are supported by building a list or data structure of slots and values to update during the update pass. This list is built incrementally as the subclasses of enqueued classes are traversed during the update pass (whenever a class from which a value is inherited is traversed during the update pass, the slot & value are added to the inherit¬ able-slot-value-list). When UPDATE_WME is called, the frame whose wme must be updated and the inher¬ itable-slot-value-list are passed in. The inherit¬ able-slot-value-list is merged with the local value updates to that frame. The wme is updated by setting the local and inheritable values in the wme.
(2) Filters are applied to frames to avoid unnec¬ essary updates. A filter recognizes that an inheritable slot should not be updated in the wme for a frame which has a local value for the slot. The local value is used instead of the inheritable value. In the call to UP- DATE_WME for Instancel, one of the members of the inheritable-slot-and-value-list is [Slotl, -1] which is the inheritable value for Slotl from the update to Classl. This must be filtered for Instancel because Instancel has a local value for Slotl. (3) When a class may inherit a slot value from multiple ancestor classes, it may be difficult for the method and system to do the propaga¬ tion properly, since a frame system inheri- tance algorithm (which permits both depth- first and breadth-first searches) would have to be inverted. When it is determined that the value for a slot can be inherited from multiple ancestor classes, the invention utilizes a frame system algorithm to inherit the slot and value from the appropriate class. The invention recognizes these cases in which the search strategy is a factor and calls the frame system function kb_GetValue to execute the multiple inheritance.
The method and apparatus of the present invention provides numerous advantages. For example, the applica¬ tion of topological sorting allows the runtime inheri¬ tance of slots and values across subclassOf and in- stanceOf, which is not part of working memory in a rule language, to be active when matching rules against frames. This application of topological sorting pro¬ vides a correctness and performance improvement over the ad hoc approach to inheritance for matching implemented in the prior art.
The algorithm is correct because all frames on which a frame depends for inheritance are updated before that frame is updated. Therefore, when a frame is updated, it will get the correct inherited values.
The algorithm is efficient because each frame is updated only one time. The correctness and efficiency of topological sorting is described in the technical report "Reducing Computation by Unifying Inference with User Interface" by Mark Perlin.
This application of topological sorting is also unique because it utilizes the complexity of inheritance of a frame system, allows for inheritance of multiple slots and values, inheritance from multiple classes, and filter optimizations.
While the best mode for carrying out the invention has been described in detail, those familiar with the art to which this invention relates will recognize various alternative designs and embodiments for practic¬ ing the invention as defined by the following claims.

Claims

WHAT IS CLAIMED IS:
1. A method for mapping information from a dynamic frame-based semantic network to a static working memory having a plurality of working memory elements, the method comprising the steps of: creating one class queue and one instance queue of frames to obtain queued frames having the information to be mapped; marking each of the queued frames of the class queue to order the queued frames of the class queue; and updating working memory elements of the working memory corresponding to the queued frames with the information to be mapped based on the order of the queued frames of the class queue to obtain an updated working memory.
2. The method as claimed in claim 1 wherein the queued frames include a plurality of class frames and wherein at least one of the class frames has at least two parent class frames having a first part of the information, the at least two parent classes being marked during the step of marking, working memory elements corresponding to the at least one class frame and at least two parent class frames being updated with the first part of the information during the step of updating.
3. The method as claimed in claim 2 wherein the instance queue includes at least one instance frame having a second part of the information and wherein a working memory element corresponding to the at least one instance frame is updated with the second part of the information during the step of updating.
4. The method as claimed in claim 3 wherein the queued class frames including the at least one subclass and the at least one instance frame have local and inheritable slots and values and wherein the corre- sponding working memory elements are updated with information based on the local and inheritable slots and values.
5. The method as claimed in claim 2 wherein each of the class frames including the at least one subclass has a corresponding counter for maintaining the order in which the corresponding working memory elements are updated.
6. The method as claimed in claim 4 further comprising the steps of: creating a plurality of inheritable slots and values during the step of updating; linking the plurality of inheritable slots and values to create a data structure; and utilizing the data structure during the step of updating to allow a working memory element corresponding to one of a class frame and an instance frame which inherits multiple slots and values to be updated a single time with the data structure of inheritable slots and values.
7. The method as claimed in claim 4 further comprising the step of filtering the frames so that an inheritable slot is not updated in its corresponding working memory element for a frame which has a local value for the inheritable slot.
8. In a data processing system including process¬ ing means and memory means including a static working memory having a plurality of working memory elements operatively coupled to the processing means, apparatus for mapping information from a dynamic frame-based semantic network to the static working memory, the apparatus comprising: means for creating one class queue and one instance queue of frames to obtain queued frames having the information to be mapped; means for marking each of the queued frames of the class queue to order the queued frames of the class queue; and means for updating the working memory elements of the working memory corresponding to the queued frames with information to be mapped based on the order of the queued frames of the class queue to obtain an updated working memory.
9. The apparatus as claimed in claim 8 wherein the queued frames include a plurality of class frames and wherein at least one of the class frames has at least two parent class frames having a first part of the information, the at least two parent classes being marked during the step of marking, working memory elements corresponding to the at least one class frame and at least two parent class frames being updated with the first part of the information during the step of updating.
10. The apparatus as claimed in claim 9 wherein the step of creating includes the step of creating a second queue including at least one instance frame having a second part of the information and wherein a working memory element corresponding to the at least one instance frame is updated with the second part of the information during the step of updating.
11. The apparatus as claimed in claim 10 wherein the queued class frames including the at least one subclass and the at least one instance frame have local and inheritable slots and values and wherein the corre- sponding working memory elements are updated with information based on the local and inheritable slots and values.
12. The apparatus as claimed in claim 9 wherein each of the class frames including the at least one subclass includes a corresponding counter for maintain¬ ing the order in which the corresponding working memory elements are updated.
13. The apparatus as claimed in claim 11 further comprising: means for creating a plurality of inheritable slots and values; and means for linking the plurality of inheritable slots and values to create a data structure wherein the means for updating utilizes the data structure to update a working memory element corresponding to a class frame which inherits multiple slots and values to be updated a single time with the data structure of inheritable slots and values.
14. The apparatus as claimed in claim 11 further comprising filtering means for filtering the queued frame so that an inheritable slot is not updated in its corresponding working memory element for a queued frame which has a local value for the inheritable slot.
PCT/US1992/002244 1991-04-18 1992-03-18 Method and apparatus for mapping information from a dynamic frame-based semantic network to a static working memory WO1992018930A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US687,125 1991-04-18
US07/687,125 US5276885A (en) 1991-04-18 1991-04-18 Single step mapping in topological order of the queued class and instance frames of a semantic network to a static working memory

Publications (1)

Publication Number Publication Date
WO1992018930A1 true WO1992018930A1 (en) 1992-10-29

Family

ID=24759167

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US1992/002244 WO1992018930A1 (en) 1991-04-18 1992-03-18 Method and apparatus for mapping information from a dynamic frame-based semantic network to a static working memory

Country Status (2)

Country Link
US (1) US5276885A (en)
WO (1) WO1992018930A1 (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5649190A (en) * 1994-06-14 1997-07-15 Harris Corporation Multi-model database system for dynamic creation and maintenance of complex objects in a real time environment
GB2302420A (en) * 1995-06-19 1997-01-15 Ibm Semantic network
US5826250A (en) * 1996-06-19 1998-10-20 Pegasystems Inc. Rules bases and methods of access thereof
US5963960A (en) * 1996-10-29 1999-10-05 Oracle Corporation Method and apparatus for queuing updates in a computer system
EP0874321A3 (en) * 1997-04-24 1999-11-10 Casa Gesellschaft für Informationstechnik mbH Relational storage and data processing system
US6976144B1 (en) * 2003-05-06 2005-12-13 Pegasystems, Inc. Methods and apparatus for digital data processing with mutable inheritance
US7665063B1 (en) 2004-05-26 2010-02-16 Pegasystems, Inc. Integration of declarative rule-based processing with procedural programming
US8335704B2 (en) * 2005-01-28 2012-12-18 Pegasystems Inc. Methods and apparatus for work management and routing
US20070233902A1 (en) * 2006-03-30 2007-10-04 Alan Trefler User interface methods and apparatus for rules processing
US8924335B1 (en) 2006-03-30 2014-12-30 Pegasystems Inc. Rule-based user interface conformance methods
US20080208785A1 (en) * 2006-03-30 2008-08-28 Pegasystems, Inc. User interface methods and apparatus for rules processing
US20090132232A1 (en) * 2006-03-30 2009-05-21 Pegasystems Inc. Methods and apparatus for implementing multilingual software applications
US8250525B2 (en) * 2007-03-02 2012-08-21 Pegasystems Inc. Proactive performance management for multi-user enterprise software systems
US8843435B1 (en) 2009-03-12 2014-09-23 Pegasystems Inc. Techniques for dynamic data processing
US8468492B1 (en) 2009-03-30 2013-06-18 Pegasystems, Inc. System and method for creation and modification of software applications
US8880487B1 (en) 2011-02-18 2014-11-04 Pegasystems Inc. Systems and methods for distributed rules processing
US9195936B1 (en) 2011-12-30 2015-11-24 Pegasystems Inc. System and method for updating or modifying an application without manual coding
US10469396B2 (en) 2014-10-10 2019-11-05 Pegasystems, Inc. Event processing with enhanced throughput
US9552222B2 (en) 2015-06-04 2017-01-24 International Business Machines Corporation Experience-based dynamic sequencing of process options
US10698599B2 (en) 2016-06-03 2020-06-30 Pegasystems, Inc. Connecting graphical shapes using gestures
US10698647B2 (en) 2016-07-11 2020-06-30 Pegasystems Inc. Selective sharing for collaborative application usage
US11048488B2 (en) 2018-08-14 2021-06-29 Pegasystems, Inc. Software code optimizer and method
US11567945B1 (en) 2020-08-27 2023-01-31 Pegasystems Inc. Customized digital content generation systems and methods

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4558413A (en) * 1983-11-21 1985-12-10 Xerox Corporation Software version management system
US4675829A (en) * 1984-07-27 1987-06-23 Intellicorp Corporation Method and apparatus for building knowledge-based systems
JPS61220027A (en) * 1985-03-27 1986-09-30 Hitachi Ltd Information memory system
US4821220A (en) * 1986-07-25 1989-04-11 Tektronix, Inc. System for animating program operation and displaying time-based relationships
EP0347162A3 (en) * 1988-06-14 1990-09-12 Tektronix, Inc. Apparatus and methods for controlling data flow processes by generated instruction sequences
US4964063A (en) * 1988-09-15 1990-10-16 Unisys Corporation System and method for frame and unit-like symbolic access to knowledge represented by conceptual structures
US4937760A (en) * 1988-09-19 1990-06-26 International Business Machines Corporation Method for sharing common values implicitly among communicating generative objects
US5115504A (en) * 1988-11-01 1992-05-19 Lotus Development Corporation Information management system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
25TH ACM/IEEE DESIGN AUTOMATION CONFERENCE 12 June 1988, IEEE COMP.SOC.PRESS,WASHINGTON,US pages 275 - 281; HONG-TAI CHOU ET AL: 'Versions and change notification in an object-oriented database system' *
D.E. KNUTH 'The art of computer programming, Vol. 1, Fundamental Algorithms' 1973 , ADDISON-WESLEY , READING, US Paragraph 2.2.3, Linked Allocation. *
MICROPROCESSING AND MICROPROGRAMMING. vol. 28, no. 1/5, March 1990, AMSTERDAM NL pages 197 - 200; H. BRETTHAUER ET AL.: 'Multiple vs. Single Inheritance in Object-oriented Programming Languages' *
RESEARCH DISCLOSURE. no. 303, July 1989, HAVANT GB page 526; 'Cluster Objects for Mass Editing' RD No 30364 *

Also Published As

Publication number Publication date
US5276885A (en) 1994-01-04

Similar Documents

Publication Publication Date Title
US5276885A (en) Single step mapping in topological order of the queued class and instance frames of a semantic network to a static working memory
Mylopoulos Conceptual modelling and Telos
Engels et al. Building integrated software development environments. Part I: tool specification
US4675829A (en) Method and apparatus for building knowledge-based systems
US7565642B2 (en) Rule engine
Dolk A generalized model management system for mathematical programming
US5402524A (en) Case-based knowledge source for artificial intelligence software shell
Zhang et al. Agent-based hybrid intelligent systems: an agent-based framework for complex problem solving
EP0365309B1 (en) A data unification system and method
US6092077A (en) Binary-oriented set sequencing
Gottlob et al. Semantics of object-oriented data models—The evolving algebra approach
Alberdi et al. ReTAX: a step in the automation of taxonomic revision
US5208899A (en) Method and apparatus for storing information about and associating slot behaviors of a slot in a frame-based semantic network
US7958074B2 (en) Method and structure for domain-independent modular reasoning and relation representation for entity-relation based information structures
Rus Algebraic processing of programming languages
Mylopoulos et al. Knowledge bases and databases: Current trends and future directions
Wilkins Using the sipe-2 planning system
Muro-Medrano et al. Knowledge representation-oriented nets for discrete event system applications
Kohler et al. Formal aspects for semantic service modeling based on high-level petri nets
Chen An object/task modleing approach based on domain knowledge and control knowledge representation
Wolverton et al. BB1 v3. 2 Manual
Browne et al. Modularity and rule-based programming
Kung The object-oriented paradigm
Yoo et al. A graph-aided inference browser for developing knowledge-based systems
Forde An application of selected artificial intelligence techniques to engineering analysis

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH DE DK ES FR GB GR IT LU MC NL SE

COP Corrected version of pamphlet

Free format text: PAGES 1/3-3/3,DRAWINGS,REPLACED BY NEW PAGES 1/3-3/3

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
122 Ep: pct application non-entry in european phase