Algebraic autolayout