A Generic Framework for Reasoning About Dynamic Networks