analysis: Added a method for generating a mapping from nodes to invariants for the InvariantCalculator.