Formal Methods for Artificial Intelligence