Understanding reference generation as a goal-oriented and dynamic process