Constraint Inference In Control And Reinforcement Learning