Securing Access Control Using Machine Learning And Formal Methods