Compute Whitney Stratifications Algebraically