Norman suggests four classes of constraints that guide behavior, with the example of assembling a Lego motorcycle (Norman, 1988):
phsyical: "a large peg cannot fit into a small hole"
semantic: "the rider […] must sit facing forward"
cultural: the red light goes on the back of the motorcycle
logical: "all the pieces should be used, with no gaps in the final product"
Norman contrasts constraints, which restrict the possible behaviors to exclude invalid actions, with affordances, which indicate possible actions. Note that in Norman's terms, graphical elements are not affordances.
Norman provides a further example of logical constraints, in the form of "natural mappings":
Norman, D. (1988). The Psychology of Everyday Things. Basic Books.