Formal Specification and Analysis of Security-Critical Norms and Policies