ALPS: An Action Language for Policy Specification and Automated Safety Analysis