What are invariants?
At the risk of sounding trite, invariants are things that “don’t vary” while other things change. The two main kinds of invariants defined in Catalysis are: Static invariants: while the state changes (i.e. for every state), the static invariant does not vary (i.e. it remains true in every state). This lets you describe things that are “always” true at any single point in time. More accurately, it is true for every state before and after any of the actions that are within the purview of that invariant. Static invariants range from the simplest type declaration of an attribute (a person’s age is “always” a non-negative integer in every state of that person); to complex relationships that must hold across multiple attributes in every state (“the qualified instructors for a course are those instructors who have passed a qualification exam for that course”). Static invariants can be conditional: e.g. every Man, at any time, must have a wife if he is married. Dynamic invariants: (also called