Techniques to learn constraints from demonstrations