Specifications from Demonstrations: Learning, Teaching, and Control