FRL(ID:2646/frl001)

Frame Representation Language 


Frame Representation Language. MIT

Used in NUDGE "A knowledge-based Scheduling Program"


Related languages
Frames => FRL   Influence
LISP => FRL   Extension of
FRL => DeBuMa   Written using
FRL => GOLDWORKS   Implementation
FRL => HPRL   Implementation
FRL => KL-ONE   Influence

References:
  • Minsky, Marvin "A Framework for Representing Knowledge" MIT AI Lab Memo AIM-306 June 1974 view details Abstract: This is a partial theory of thinking, combining a number of classical and modern concepts from psychology, linguistics, and AI. Whenever one encounters a new situation (or makes a substantial change in one's viewpoint) he selects from memory a structure called a frame, a remembered framework to be adopted to fit reality by changing details as necessary. A frame is a data-structure for representing a stereotyped situation, like being in a certain kind of living room, or going to a child's birthday party. Attached to each frame are several kinds of information. Some of this information is about how to use the frame. Some is about what one can expect to happen next. Some is about what to do if these expectations are not confirmed. The "top levels" of a frame are fixed, and represent things that are always true about the supposed situation. The lower levels have many "alota" that must be filled by specific instances or data. Collections of related frames are linked together into frame- systems. The effects of important actions are mirrored by transformations between the frames of a system. These are used to make certain kinds of calculations economical, to represent changes of emphasis and attention and to account for effectiveness of "imagery". In Vision, the different frames of a system describe the scene from different viewpoints, and the transformations between one frame and another represent the effects of moving from place to place. Other kinds of frame- systems can represent actions, cause-effect relations, or changes in conceptual viewpoint. The paper applies the frame-system idea also to problems of linguistic understanding: memory, acquisition and retrieval of knowledge, and a variety of ways to reason by analogy and jump to conclusions based on partial similarity matching.

    External link: Online copy Extract: The concept of frames
    A frame is a data-structure for representing a stereotyped situation, like being in a certain kind of living room, or going to a child"s birthday party. Attached to each frame are several kinds of information. Some of this information is about how to use the frame. Some is about what one can expect to happen next. Some is about what to do if these expectations are not confirmed.

    We can think of a frame as a network of nodes and relations. The "top levels" of a frame are fixed, and represent things that are always true about the supposed situation. The lower levels have many terminals?"slots" that must be filled by specific instances or data. Each terminal can specify conditions its assignments must meet. (The assignments themselves are usually smaller "sub-frames.") Simple conditions are specified by markers that might require a terminal assignment to be a person, an object of sufficient value, or a pointer to a sub-frame of a certain type. More complex conditions can specify relations among the things assigned to several terminals.

    Collections of related frames are linked together into frame-systems . The effects of important actions are mirrored by transformations between the frames of a system. These are used to make certain kinds of calculations economical, to represent changes of emphasis and attention, and to account for the effectiveness of "imagery."

    For visual scene analysis, the different frames of a system describe the scene from different viewpoints, and the transformations between one frame and another represent the effects of moving from place to place. For non-visual kinds of frames, the differences between the frames of a system can represent actions, cause-effect relations, or changes in conceptual viewpoint. Different frames of a system share the same terminals; this is the critical point that makes it possible to coordinate information gathered from different viewpoints.

    Much of the phenomenological power of the theory hinges on the inclusion of expectations and other kinds of presumptions. A frame"s terminals are normally already filled with "default" assignments. Thus, a frame may contain a great many details whose supposition is not specifically warranted by the situation. These have many uses in representing general information, most likely cases, techniques for bypassing "logic," and ways to make useful generalizations.

    The default assignments are attached loosely to their terminals, so that they can be easily displaced by new items that fit better the current situation. They thus can serve also as "variables" or as special cases for "reasoning by example," or as "textbook cases," and often make the use of logical quantifiers unnecessary.

    The frame-systems are linked, in turn, by an information retrieval network. When a proposed frame cannot be made to fit reality?when we cannot find terminal assignments that suitably match its terminal marker conditions?this network provides a replacement frame. These inter-frame structures make possible other ways to represent knowledge about facts, analogies, and other information useful in understanding.

    Once a frame is proposed to represent a situation, a matching process tries to assign values to each frame"s terminals, consistent with the markers at each place. The matching process is partly controlled by information associated with the frame (which includes information about how to deal with surprises) and partly by knowledge about the system"s current goals. There are important uses for the information, obtained when a matching process fails. I will discuss how it can be used to select an alternative frame that better suits the situation.
  • Kuipers, Benjamin J. "A Frame for Frames: Representing Knowledge for Recognition" MIT AI Lab Memo AIM-322 March 1975 view details Abstract: This paper presents a version of frames suitable for representing knowledge for a class of reconition problems. An initial section gives an intuitive model of frames, and illustrates a number of desirable features of such a representation. A more technical example describes a small recognition program for the Blocks World which implements some of these features. The final section discusses the more general significance of the representation and the recognition process used in the example.
    External link: Online copy
  • Goldstein, Ira P and R Bruce Roberts, "NUDGE A knowledge-based Scheduling Program" AI Lab Memo AIM-405, MIT AI Lab, 1977 view details
  • Roberts, R. Bruce and Ira P. Goldstein "The FRL Manual" AI Lab Memo AIM-409, MIT AI Lab, 1977. view details Abstract: The Frame Representation Language (FRL) is described. FRL is an adjunct to LISP which implements several representation techniques suggested by Minsky's [75] concept of a frame: defaults, constraints, inheritance, procedural attachment and annotation. External link: Online copy at MIT
  • Roberts, R. Bruce and Ira P. Goldstein "The FRL Primer" MIT AI Lab Memo AIM-408 July 1977 view details Abstract: The Frame Representation Language (FRL) is an experimental language written to explore the use of frames as a knowledge representation technique. The term 'frame' as used in FRL was inspired by Minsky's [75] development of frame theory. FRL extends the traditional Property List representation scheme by allowing properties to have comments, defaults and constraints, to inherit information from abstract forms of the same type, and to have attached procedures triggered by adding or deleting values, or if a value is needed. We introduce FRL with the aid of a simple example: WHOSIS, a database of AI persons' names, addresses, interests and publications. A second section contains an abridged manual describing FRL's most-used commands and conventions.
    External link: Online copy Extract: The (abridged) FRL Manual

    The (abridged) FRL Manual


    I. What is a FRAME?


    A FRL frame is implemented as nested association lists with at most five levels of embedding. The respective sub-

    structures of a Frame are named: Slot, Facet, Datum, Comment and Message. The overall structure of a frame follows:



    (framel (slotl (facetl (datuml (labell messagel message? ... more Messages ... )
    ... more Comments ...) (datum? (

    labell messagel ...))
    ... more Data ...) (facet? (datuml (labell messagel message? ...)))
    ... more Facets 

    ...)
    (slot? (facetl (datuml (labell messagel ...) ...)...)...) ... more Slots ...)

    We will refer to the first element in one of
                these sub-structures as the indicator (said to name the structure)
                and the remaining elements collectively as the bucket (in the case
                of a slot, the bucket is a list of facets, for example). A path of
                indicators identifies a sub-structure in a frame. The order of
                sub-structures at any level in a frame is insignificant. In
                practice, facet names conventionally have a prefix "$"; labels, a
                suffix ":". This is simply to facilitate their recognition by the
                programmer.


              2. Adding and Removing Frames.

    (FASSERT name slotl slot2 - slotN)

    creates a frame name (if it doesn't already
                exist) containing the slots slotl ... slotN. If the name frame
                exists, the new information in the slots is merged with the
                existing slots. The frame is stored as the FRAME property of name
                and name is added to *FRAMES*, the list of known frames. FASSERT is
                a FEXPR.


    The FASSERT switch. If FASSERT is nil, FASSERT
                forms are not interpreted. This is convenient for selectively
                reading just the code in a file containing intermixed code and
                frame definitions.

    (FERASE frame)

    removes frame from the FRAME property of its
                name and its name from the list *FRAME*.


    Unless stated otherwise, a frame argument to a
                function can be either the name of a frame or the frame structure
                itself.


              3. Frames and their names.

    (FRAME frame)

    returns a frame structure. An error if frame is
                neither a frame name nor a frame structure.

    (FNAME frame)

    returns the name of frame. An error if frame is
                neither a frame name nor a frame structure

    (FSLOTS fame)

    returns a list of the slot names in
                frame.


              4. The AKO and INSTANCE slots.


    A slot is a generalization of the
                attribute-value pair in the traditional Property List
                representation, $VALUE is the slot facet which indicates its
                values. Five other "facets" indicate other types of knowledge
                associated with the slot. Data in the $DEFAULT facet supplies
                defaults. Data in $IF-ADDED and $IF-REMOVED facets are procedures
                triggered whenever a slot value is added or removed. $IF-NEEDED
                data are procedures which may compute a slot value. The $REQUIRE
                facet hold predicates which describe and restrict the value.


    Two slots are recognized by FRL system
                functions: AKO (A Kind Of) and INSTANCE. These define a relation
                between frames along which data is inherited. The AKO relation is
                used to establish a conceptual hierarchy of frames in which general
                information stored higher in the hierarchy is inherited by more
                specialized concepts lower in the hierarchy. The INSTANCE slot is
                maintained as an inverse of the AKO pointer; thus

     (FPUT 'A 'AKO 'B)

    has the side-effect of asserting

    (FPUT 'B 'INSTANCE 'A).
    (FINSTANTIATE frame {name})

    creates an instance of frame; i.e., it possesses
                only an AKO link to frame. Its name is derived from the optional
                name argument and will be unique. The newly created frame is
                returned.


    A relation between frames is defined by making
                the name of one frame the value of a slot in another frame. The
                slot names the relation. A tree of frame relations is possible
                since a slot can have many values. Several functions are provided
                to examine these relations.

    (FCHILDREN frame slot)

    returns a list of the immediate inferiors of
                frame along the relation named by slot. This is just a list of
                values in slot.

    (FTREE frame slot)

    returns a tree of the form (root subtreel
                subtree2 ...) with frame at the root; each subtree's root is a
                child of frame along the relation named by slot.

    (FDESCENDANTS fame slot)

    returns a list of all inferiors of frame along
                the relation slot defines. That is, it includes all the frames
                occurring in the "tree" of FTREE except the root frame.

    (FRINGE frame slot)

    returns a list of all "leaves" on the tree of
                (FTREE frame slot). (FLINK? relation fl (2)


    Does relation connect fl to f2? Relation is a
                slot name whose values must be frame names; fl and (2 are frames.
                (FLINK? 'AKO 'A 'B) is true only if a path exists from A to B
                following only the AKO "link"; i.e, if one of the values of the AKO
                slot of A is B, or FLINK? is true for any of these values.

    (AKO? f1 f2)

    returns T only if f1 is a kind of f2. Equivalent
                to (FLINK? 'AKO f1 f2). Similar definitions are possible for any
                slot whose value is another frame.


              5. Adding and Removing Parts of a Frame.

    (FPUT frame slot facet datum label message)

    adds the last argument at the point in frame
                named by the indicator path (the intervening arguments) and returns
                the modified frame. Adding new information to a frame is a merging
                process that retains the uniqueness of each indicator. FPUT is a
                LEXPR and can take from 2 to 6 arguments. It can be used to add an
                element anywhere in a frame, to add a slot name to frame or to put
                a message in a comment labeled label.


    FPUT has an important side-effect Putting data
                items into a $VALUE facet triggers the execution of all procedures
                in the $IF-ADDED facet of the slot.

    (FREMOVE frame slot facet datum label message )

    deletes the sub-structure of frame indicated by
                the path slot -> facet -> datum... . It returns the
                modified frame. FREMOVE is a LEXPR and can take from 2 to 6
                arguments. The structure deleted will have had as its indicator the
                final argument to FREMOVE.


    FREMOVE, too, has an important side-effect If
                any data in a $VALUE facet is deleted by this command, all
                procedures in the $IF-REMOVED facet of the slot are
                executed.


              6. The $IF-ADDED and $IF-REMOVED
                procedures.


    Data in the $IF-ADDED and $IF-REMOVED facets is
                treated as evaluable LISP forms. The forms in the $IF-ADDED facet
                will be run whenever a value is added to the slot (i.e., in the
                $VALUE facet) by FASSERT or FPUT. The forms in the $IF-REMOVED
                facet will be run whenever a value is deleted from a slot (i.e.,
                from the $VALUE facet) by FERASE or FREMOVE.


    ** All local and inherited procedures will be
                run.


    ** No $IF-ADDED procedure will be run if the
                value was already there. This serves to eliminate loops.


    ** No $IF-REMOVED procedure will be run if the
                value was not actually there to be removed.


    ** The procedures will be run in a Frame
                Environment in which the following global variables have been
                bound:


    :FRAME          - frame


    :SLOT  -
              - slot


    :FACET           - $IF-ADDED or $IF-REMOVED (as
                appropriate).


    In addition, the free variable ":VALUE" will be
                bound to the datum whose addition or removal precipitated the
                execution of the attached procedures.


              7. Retrieving Parts of a Frame.


    (FGET frame slot facet datum label message
                )


    returns a list of all the indicators in the
                bucket addressed by the path of arguments. Usually, three arguments
                are given. The value of a slot is retrieved by (FGET frame slot
                '$VALUE). FGET looks first in the slot of frame. If data exists, a
                list of the items is returned. If no data is found, the facet of
                the frame named in frame's AKO slot is inspected; and so on until a
                frame is found containing data, which is then returned.


    An important special case is FGETting from a
                $VALUE facet. If still no value is found, FGET repeats, looking in
                the $DEFAULT facet instead.


    ** Inheritance stops at the first frame along
                the chain of AKO links that contains data.


    ** If FGET returns NIL, no data was
                found.


    ** A frame can be a-kind-of more than one other
                frame; i.e., have more than one value in its AKO slot. FGET traces
                each of the AKO paths, stopping at the first data encountered along
                each, and returns a list of all data thus found appended
                together.


    ** The FINHERIT Comment A comment - (FINHERIT:
                CONTINUE) - on all datum structures in a facet causes the
                inheritance to proceed further along the AKO link as if no data had
                been found; it returns the local data appended to that found
                further along the link.


              8. The $IF-NEEDED procedures.


    All data in the $IF-NEEDED facets is treated as
                a LISP procedure. It can be run using the following
                function.

    (FNEED frame slot)

    executes the procedures in the IIF-NEEDED facet
                of slot in frame. The procedures will be run in a Frame Environment
                in which the following free variables have been bound:

    :FRAME = frame, :SLOT = slot, :FACET = $IF-

    NEEDED


              9. Constraining a Value.


    Data items in the $REQUIRE facet should be a
                Lisp predicates which describe allowable values for the slot There
                is an implicit conjunction between all data items present The
                predicates are evaluated in the appropriate Frame Environment, like
                the other procedural knowledge already discussed. The variable
                :VALUES is bound to the list of values in question.

    (FCHECK frame slot {value})

    returns a poll of all constraints in the
                $REQUIRE facet of slot in frame applied to the values of the slot
                Both local and inherited constraints are included. If an optional
                value is supplied, it is checked against the constraints instead.
                Constraints are run in a Frame Environment with :FRAME, :SLOT and
                :VALUES bound. A poll is a list of four elements:

    (<summary> <list of true predicates>) 

    <list of false predicates>) <list of error-producing predicates>)

    where the <summary> is T only if all are
                true, NIL only if some are false and none produce errors, and ?
                otherwise.


    Two predicates test the classification of a
                frame. Frames in an AKO hierarchy are distinguished as being either
                GENERIC or INDIVIDUAL by the value of their CLASSIFICATION
                slot

    (INDIVIDUAL? frame)

    returns T only if frame is marked as an
                individual. INDIVIDUAL? returns NIL if frame is generic, and ?
                otherwise.

    (GENERIC? frame)

    is defined analoguously to INDIVIDUAL?.


              10. Saving and Restoring Frames.

    (FDUMP frames file)

    outputs to file each frame in the list frames.
                Frames so dumped can be read back, into FRL to restore the state of
                the these frames in the data base. FDUMP creates a file of DEFRAME
                forms.

    (DEFRAME name slot1 slot2..._ shift)

    defines a frame name containing precisely the
                slots slot1 ... slotN. Should name already exist, its previous
                definition is destroyed. The frame is stored as the FRAME property
                of name and name is added to *FRAMES*, the list of known frames.
                DEFRAME is a FEXPR.


    The DEFRAME switch. If  DEFRAME is nil, DEFRAME
                forms are not interpreted. This is convenient when for selectively
                reading a file with intermixed code and frame definitions.


     


  • Rosenberg, S. "Frames-based Text Processing," AI Lab Memo AIM-431, MIT, 1977 view details
  • Stansfield, James L. "COMEX: A Support System for a Commodities Expert" AI Lab Memo AIM-423 August 1977 view details Abstract: The intelligent support system project is developing a program (COMEX) to assist a commodities expert in tasks such as interpreting data, predicting trends and intelligent noticing. Large amounts of qualitative and quantitative information about factors such as weather, trade and crop condition need to be managed. This memo presents COMEX-), a prototype system written in FRL, a frame-based language (Goldstein & Roberts, 1977). COMEX-O has a complaint handling system, frame structure matching and simple reasoning. By conversing with a user, it builds groupings of frame structures to represent events. These are called CLUSTERS and are proposed as a new representation method. New CLUSTERS are built from previously defined ones using INSTANTIATION and AGGREGATION, two methods which combine with frame inheritance and constraints to make up a general event representation mechanism. CLUSTERS capture the idea of generic patterns of relationships between frames and raise an issue named the GENERIC CONSTRAINT PROBLEM concerning constraints between the parts of a cluster. The final section presents plans for future work on qualitative reasoning within COMEX and includes a hypothetical scenario.
    External link: Online copy
  • Stefik, M. An examination of a frame-structured representation system.Proceedings of the International Joint Conference on Artificial Intelligence, Tokyo, Japan, pp. 845-852, August 1979. view details Extract: Inheritance
    The recognition of different forms of inheritance is not unique to the Unit Package. Goldstein and Roberts [8] distinguished two kinds of inheritance in FRL-0 - additive and restrictive. Pdditive inheritance permitted a specialization to add new non-contradictory facts. This corresponds to the "R" and "0" roles above. Restrictive inheritance is used when a specialization overrides the information in a more general schema. This corresponds to the "M" role above, which we have not implemented. FRL-0 also encouraged the use of "idiosyncratic forms" of inheritance by the use of attached procedures. These procedures effected the transmission of values from frames other than the parent. This seems to be an attempt to capture some of the "multiple-perspectives" idea of KRL using less machinery. Abstract: The Unit Package is an interactive knowledge representation system with representations for individuals, classes, indefinite individuals, and abstractions. Links between the nodes are structured with explicit definitional roles, types of inheritance, defaults, and
    various data formats. This paper presents the general ideas of the Unit Package and compares it with other current knowledge representation languages. The Unit Package was created for a hierarchical planning application, and is now in use by several Al projects. pdf
  • Kantrowitz, Mark "FrameWork Manual" CMU, 1990 view details Extract: Overview
    FrameWork, like all other frame based systems, is ultimately based on Minsky's frame theory of the representation of knowledge [Minsky 1975]. A frame is an object with an associated list of attributes. Objects (ala object-oriented programming) are data structures with associated procedures. The attributes of a frame include VALUES and BEHAVIORS. Some behaviors, called DEMONS, are functions attached to attributes to monitor their access and modification, and initiate actions if invoked or otherwise activated.

    Using frames we can create a network of objects representing facts, things, and other concepts, connected through a variety of links. Objects and their links are represented as frames with names, slots, facets, and values. (Other frame systems may have more levels of representation. The primitives given in FrameWork, however, are easily extended to arbitrary numbers of levels because of the uniformity of representation.) Each object has a name (frame) and a set of slots; each slot has a set of facets; and each facet has a set of values. Values may be arbitrary lisp objects, including functions and the name of other frames. In some sense a frame is a generalized property list: it contains more than just values, and can inherit  information from related frames.

    Frames are implemented as nested association lists (key-value pairs) and are stored in a hash table under the frame name for efficient access:

          ([frame name]
          ([slot1] ([facet1] . ([value1] [value2] …))
                ([facet2] . ([value1] …))
                …)
          ([slot2] ([facet1] . ([value1] …)) …)
          …)

    Slots may be used to name relations by making the name of one frame the value of the slot in another frame. For example, the :AKO slot (an abbreviation for "A Kind Of") and its inverse, :KINDSOF, link objects in the class hierarchy. Many other types of links exist, including user-defined links. These relations may be used to  connect the frames into a network. (Note that the relationship defined by :AKO links is a network and need not be a hierarchy, since it is permissible for an object to have more than one :AKO value, and for many objects to be linked to the same parent by :AKO slot. For many functions even :AKO cycles are permitted, since these functions specifically check for cycles.)

    The primary facet is :VALUE, which is used to store the value of an attribute. Other system defined facets include :DEFAULT, :MODE, :METHOD, :If-Needed, :If-Fetched, :If-Removed. The :MODE facet is used to associate properties with objects. The :METHOD facet is used to name procedures that are invoked in response to messages to an object. The :If-Needed, :If-Fetched, :If-Removed, and :DEFAULT facets are demons  which are used to monitor the :VALUE facet.

    In addition, there are demons which monitor the :VALUE facet and maintain inverse-slot relationships for any values stored there. For example, whenever a value x is stored into the :AKO slot of the object y, this demon automatically stores y into the :KINDSOF slot of the object x. Extract: FRL, FrameKit , Framework, MacPIKS
    The FRL Manual and the FrameKit (v2.0) user's Guide were read to ensure that this system did not overlook any of the basic  functionality of frame systems. The MacPIKS (v1.0) user's Guide (a frame system implemented by the author for the Planning Research Corporation in 1985) was also read to verify that FrameWork did *not* accidentally include any innovative ideas developed for  MacPIKS.