A KB contains not only ground facts about instances, but also general rules that constrain the valid relationships among instances. When new facts are asserted, these constraints may be checked to assure that the KB remains logically consistent. When constraints are violated, a representation system may signal an error to the user or take some action to return the KB to a consistent state.
Most FRSs support a limited form of constraints. The most common are called slot constraints. Slot constraints are rules associated with template slots that constrain the possible values of the corresponding own slots. The Generic Frame Protocol supports two slot constraints: type and number restrictions on slot values. A slot value type restriction stipulates that the values of a slot on all instances of a class must be instances of some other class, the ``type'' of those values. For example, one could say that the the favorite foods of any human must be edible-foods by asserting that the slot value type of the favorite-food slot on the human frame is edible-food. Edible-food is a class frame, whose instances are foods palatable to humans. The force of the slot constraint is limited to instances of the class human; the favorite-food slot for pets may have a different value type restriction. A number restriction is a specification of the slot value cardinality for a slot: the number of possible values for a slot on an instance. Most commonly, a slot value cardinality restriction is used to limit the number of possible values to at most 1 (i.e., single-valued), at least 1 (i.e., non-empty) or exactly 1 (i.e., functional). For example, to say that the a person can only have one biological father one could specify that the slot value cardinality of the template slot biological-father on the class person is at most 1. In the Generic Frame Protocol, slot constraints are specified with facets, which are described in the next section.