Գրեք սա: An algebraic approach to multi−sorted constraints