Primitive Type Abstractions: An effective way to reduce the state space of a program is to replace the primitive types with the corresponding abstractions that encapsulate all the possible operations that are performed on these types.
These abstractions allow us to replace the actual primitive variables or the operations involving those with the non-deterministic choices with restricted range of values. This can cut down the number of states that has to be covered by the model checker dramatically.
As an example, consider the following class which encapsulates different operations that can be carried out on doubles.
Here is the implementation for the operator==() which implements the real behavior of the operator:
With this abstraction it would be easy to reduce the potentially infinite state space required to model check the equality operator “==” with a binary choice (true or false)—just replace the “m_value == value” with “chooseBoolean()” in the body of the method.