A framework to compare instances of the same class